Skip to content

Commit c77ddb8

Browse files
pruthvistonyjeffdaily
authored andcommitted
[ABI Break] Remove 'memoryType' from hipPointerAttribute_t
- SWDEV-425146
1 parent 20eb73d commit c77ddb8

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

aten/src/ATen/cuda/detail/CUDAHooks.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,10 +151,10 @@ bool CUDAHooks::isPinnedPtr(const void* data) const {
151151
return false;
152152
}
153153
#endif
154-
#if !defined(USE_ROCM)
155-
return attr.type == cudaMemoryTypeHost;
156-
#else
154+
#if defined(USE_ROCM) && ROCM_VERSION < 60000
157155
return attr.memoryType == cudaMemoryTypeHost;
156+
#else
157+
return attr.type == cudaMemoryTypeHost;
158158
#endif
159159
}
160160

caffe2/core/common_gpu.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,10 @@ namespace caffe2 {
8686
class TensorCoreEngine {};
8787
#endif // USE_ROCM
8888

89-
#if !defined(USE_ROCM)
90-
#define CAFFE2_CUDA_PTRATTR_MEMTYPE type
91-
#else
89+
#if defined(USE_ROCM) && ROCM_VERSION < 60000
9290
#define CAFFE2_CUDA_PTRATTR_MEMTYPE memoryType
91+
#else
92+
#define CAFFE2_CUDA_PTRATTR_MEMTYPE type
9393
#endif
9494

9595
/**

0 commit comments

Comments
 (0)