Skip to content

Commit

Permalink
Fix reference to HIP point attribute structure
Browse files Browse the repository at this point in the history
When checking whether a pointer is on a HIP device, the previous code
had an incorrect name for the member of the `hipPointerAttribute_t`
structure. The code is changed to use the correct identifier for
this member.
  • Loading branch information
kmorel authored and JieyangChen7 committed Dec 20, 2024
1 parent 5155138 commit 58f8d40
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/mgard-x/RuntimeX/DeviceAdapters/DeviceAdapterHip.h
Original file line number Diff line number Diff line change
Expand Up @@ -928,7 +928,7 @@ template <> class MemoryManager<HIP> {
log::dbg("Calling MemoryManager<HIP>::IsDevicePointer");
hipPointerAttribute_t attr;
hipPointerGetAttributes(&attr, ptr);
return attr.memoryType == hipMemoryTypeDevice;
return attr.type == hipMemoryTypeDevice;
}

template <typename T> MGARDX_CONT static int GetPointerDevice(T *ptr) {
Expand Down

0 comments on commit 58f8d40

Please sign in to comment.