Fixes a bug that led to setting wrong access type for device local memory
The access type for extended scope fine grained memory was being returned as never
allowed by default
Change-Id: I0167ea0e5931053f22f2d2755bf426d43d2bb8e5
[ROCm/ROCR-Runtime commit: 82e7979c61]
This commit is contained in:
zatwierdzone przez
Shweta Khatri
rodzic
09589e5929
commit
9fda38f0ba
@@ -495,21 +495,16 @@ hsa_amd_memory_pool_access_t MemoryRegion::GetAccessInfo(
|
||||
|
||||
// Determine access type for device local memory which is
|
||||
// guaranteed to be HSA_HEAPTYPE_FRAME_BUFFER_PUBLIC
|
||||
// Return disallowed by default if framebuffer is coarse grained
|
||||
// without regard to type of requesting device (CPU / GPU)
|
||||
// Return disallowed by default if framebuffer is fine grained
|
||||
// and requesting device is connected via xGMI link
|
||||
|
||||
if (IsLocalMemory()) {
|
||||
|
||||
// Return disallowed by default if memory is coarse
|
||||
// grained without regard to link type
|
||||
if (extended_scope_fine_grain() == false && fine_grain() == false) {
|
||||
// grained or extended scope fine grained without regard to link type
|
||||
if (fine_grain() == false) {
|
||||
return HSA_AMD_MEMORY_POOL_ACCESS_DISALLOWED_BY_DEFAULT;
|
||||
}
|
||||
|
||||
// Return disallowed by default if memory is fine
|
||||
// grained and link type is xGMI.
|
||||
// grained and requesting device is connected via xGMI link
|
||||
if (agent.HiveId() == owner()->HiveId()) {
|
||||
return HSA_AMD_MEMORY_POOL_ACCESS_DISALLOWED_BY_DEFAULT;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user