Skip to content
This repository was archived by the owner on Jan 26, 2024. It is now read-only.

Commit 8690f05

Browse files
committed
SWDEV-282419 - Use HSA_AMD_SVM_ATTRIB_AGENT_ACCESSIBLE for unset
When unsetting runtime should use HSA_AMD_SVM_ATTRIB_AGENT_ACCESSIBLE for the agent and not HSA_AMD_SVM_ATTRIB_AGENT_ACCESSIBLE_IN_PLACE Change-Id: I3814802d1fb3b72c54e7566defafafed6b0d5cee
1 parent 8f9071e commit 8690f05

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

device/rocm/rocdevice.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2268,8 +2268,8 @@ bool Device::SetSvmAttributesInt(const void* dev_ptr, size_t count,
22682268
break;
22692269
}
22702270
case amd::MemoryAdvice::UnsetAccessedBy:
2271-
// @note: 0 may cause a failure on old runtimes
2272-
attr.push_back({HSA_AMD_SVM_ATTRIB_AGENT_ACCESSIBLE_IN_PLACE, 0});
2271+
// When unsetting we should use HSA_AMD_SVM_ATTRIB_AGENT_ACCESSIBLE for the agent
2272+
attr.push_back({HSA_AMD_SVM_ATTRIB_AGENT_ACCESSIBLE, getBackendDevice().handle});
22732273
break;
22742274
case amd::MemoryAdvice::SetCoarseGrain:
22752275
attr.push_back({HSA_AMD_SVM_ATTRIB_GLOBAL_FLAG, HSA_AMD_SVM_GLOBAL_FLAG_COARSE_GRAINED});

0 commit comments

Comments
 (0)