We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 8c604b0 + 9c68768 commit 2974c52Copy full SHA for 2974c52
source/adapters/hip/usm.cpp
@@ -78,9 +78,10 @@ USMFreeImpl([[maybe_unused]] ur_context_handle_t hContext, void *pMem) {
78
#else
79
const auto Type = hipPointerAttributeType.memoryType;
80
#endif
81
- UR_ASSERT(Type == hipMemoryTypeDevice || Type == hipMemoryTypeHost,
+ UR_ASSERT(Type == hipMemoryTypeDevice || Type == hipMemoryTypeHost ||
82
+ Type == hipMemoryTypeManaged,
83
UR_RESULT_ERROR_INVALID_MEM_OBJECT);
- if (Type == hipMemoryTypeDevice) {
84
+ if (Type == hipMemoryTypeDevice || Type == hipMemoryTypeManaged) {
85
UR_CHECK_ERROR(hipFree(pMem));
86
}
87
if (Type == hipMemoryTypeHost) {
0 commit comments