Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare for hipMemoryType changes in ROCm 6 #1418

Merged
merged 1 commit into from
Nov 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions lib/targets/hip/malloc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -528,12 +528,15 @@ namespace quda
errorQuda("hipPointerGetAttributes returned error: %s\n", hipGetErrorString(error));
}

switch (attr.memoryType) {
switch (attr.type) {
#if HIP_VERSION_MAJOR >= 6
case hipMemoryTypeUnregistered: return QUDA_CPU_FIELD_LOCATION;
#endif // HIP_VERSION_MAJOR >= 6
case hipMemoryTypeHost: return QUDA_CPU_FIELD_LOCATION;
case hipMemoryTypeDevice: return QUDA_CUDA_FIELD_LOCATION;
case hipMemoryTypeArray: return QUDA_CUDA_FIELD_LOCATION;
case hipMemoryTypeUnified: return QUDA_CUDA_FIELD_LOCATION; ///< Not used currently
default: errorQuda("Unknown memory type %d\n", attr.memoryType); return QUDA_INVALID_FIELD_LOCATION;
default: errorQuda("Unknown memory type %d\n", attr.type); return QUDA_INVALID_FIELD_LOCATION;
}
}

Expand Down
Loading