Skip to content

Commit 2c48e52

Browse files
rakesroytrws
authored andcommitted
use hipPointerAttribute_t.type as HIP is removing hipPointerAttribute_t.memoryType
1 parent 6e19b35 commit 2c48e52

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

include/camp/resource/hip.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,11 @@ namespace resources
113113
hipPointerAttribute_t a;
114114
hipError_t status = hipPointerGetAttributes(&a, p);
115115
if (status == hipSuccess) {
116+
#if (HIP_VERSION_MAJOR >= 6)
117+
switch (a.type) {
118+
#else
116119
switch (a.memoryType) {
120+
#endif
117121
case hipMemoryTypeHost:
118122
return MemoryAccess::Pinned;
119123
case hipMemoryTypeDevice:

0 commit comments

Comments
 (0)