P4 to Git Change 1316221 by scharupa@scharupa_temp on 2016/09/20 01:44:43
SWDEV-96479 - bug fix, exposing atomics capabilities based on GFX IP. For Hawaii the atomics is not supported hence disabled. Affected files ... ... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocdevice.cpp#17 edit
This commit is contained in:
@@ -800,7 +800,10 @@ Device::populateOCLDeviceConstants()
|
||||
info_.nativeVectorWidthLong_ = info_.preferredVectorWidthLong_ = 1;
|
||||
info_.nativeVectorWidthFloat_ = info_.preferredVectorWidthFloat_ = 1;
|
||||
|
||||
info_.hostUnifiedMemory_ = CL_TRUE;
|
||||
if (agent_profile_ == HSA_PROFILE_FULL) { // full-profile = participating in coherent memory,
|
||||
// base-profile = NUMA based non-coherent memory
|
||||
info_.hostUnifiedMemory_ = CL_TRUE;
|
||||
}
|
||||
info_.memBaseAddrAlign_ = 8 * (flagIsDefault(MEMOBJ_BASE_ADDR_ALIGN) ?
|
||||
sizeof(cl_long16) : MEMOBJ_BASE_ADDR_ALIGN);
|
||||
info_.minDataTypeAlignSize_ = sizeof(cl_long16);
|
||||
@@ -961,9 +964,12 @@ Device::populateOCLDeviceConstants()
|
||||
info_.svmCapabilities_ |= CL_DEVICE_SVM_FINE_GRAIN_BUFFER;
|
||||
// Report fine-grain system only on full profile
|
||||
if (agent_profile_ == HSA_PROFILE_FULL) {
|
||||
info_.svmCapabilities_ |= CL_DEVICE_SVM_FINE_GRAIN_SYSTEM;
|
||||
info_.svmCapabilities_ |= CL_DEVICE_SVM_FINE_GRAIN_SYSTEM;
|
||||
}
|
||||
// Report atomics capability based on GFX IP, control on Hawaii
|
||||
if (info_.hostUnifiedMemory_ || deviceInfo_.gfxipVersion_ >= 800) {
|
||||
info_.svmCapabilities_ |= CL_DEVICE_SVM_ATOMICS;
|
||||
}
|
||||
info_.svmCapabilities_ |= CL_DEVICE_SVM_ATOMICS;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user