P4 to Git Change 1545906 by gandryey@gera-lnx-rcf on 2018/04/24 19:10:41
SWDEV-79445 - OCL generic changes and code clean-up
- Report an error if persistent memory allocation failed. The original logic was switching to local memory, but SSG can't work with it. The logic should work properly under Linux, but in Windows OS never fails persistent allocation.
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paldevice.cpp#86 edit
[ROCm/clr commit: 1c91644f1b]
이 커밋은 다음에 포함됨:
1 부모
dacb39cafa
커밋
6a915378ee
1 파일이 변경됨
+9
-4
@@ -1254,12 +1254,17 @@ pal::Memory* Device::createBuffer(amd::Memory& owner, bool directAccess) const {
|
||||
} else if (owner.getMemFlags() & CL_MEM_USE_PERSISTENT_MEM_AMD) {
|
||||
// Attempt to allocate from persistent heap
|
||||
result = gpuMemory->create(Resource::Persistent);
|
||||
// Disallow permanent map for Win7 only, since OS will move buffer to sysmem
|
||||
if (IS_LINUX ||
|
||||
if (result) {
|
||||
// Disallow permanent map for Win7 only, since OS will move buffer to sysmem
|
||||
if (IS_LINUX ||
|
||||
// Or Win10
|
||||
(properties().gpuMemoryProperties.flags.supportPerSubmitMemRefs == false)) {
|
||||
void* address = gpuMemory->map(nullptr);
|
||||
CondLog(address == nullptr, "PAL failed lock of persistent memory!");
|
||||
void* address = gpuMemory->map(nullptr);
|
||||
CondLog(address == nullptr, "PAL failed lock of persistent memory!");
|
||||
}
|
||||
} else {
|
||||
delete gpuMemory;
|
||||
return nullptr;
|
||||
}
|
||||
} else if (directAccess || (type == Resource::Remote)) {
|
||||
// Check for system memory allocations
|
||||
|
||||
새 이슈에서 참조
사용자 차단