P4 to Git Change 1472384 by lmoriche@lmoriche_opencl_dev2 on 2017/10/19 03:29:10

SWDEV-126884 - OCL 2.1 Platform APIs
	- Fix OCL/ROCm OpenCL C version

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpucompiler.cpp#157 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.cpp#578 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuresource.cpp#240 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paldevice.cpp#65 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocdevice.cpp#70 edit
... //depot/stg/opencl/drivers/opencl/runtime/runtimedefs#46 edit
This commit is contained in:
foreman
2017-10-19 03:34:06 -04:00
orang tua 04f538b5e6
melakukan 46dcd95add
5 mengubah file dengan 12 tambahan dan 10 penghapusan
+4 -4
Melihat File
@@ -216,7 +216,7 @@ bool NullDevice::create(CALtarget target) {
compiler_ = aclCompilerInit(&opts, NULL);
}
if (settings().hsail_ || (settings().oclVersion_ == OpenCL20)) {
if (settings().hsail_ || (settings().oclVersion_ >= OpenCL20)) {
// Runtime doesn't know what local size could be on the real board
info_.maxGlobalVariableSize_ = static_cast<size_t>(512 * Mi);
@@ -487,7 +487,7 @@ void NullDevice::fillDeviceInfo(const CALdeviceattribs& calAttr, const gslMemInf
::snprintf(info_.driverVersion_, sizeof(info_.driverVersion_) - 1, AMD_BUILD_STRING);
info_.profile_ = "FULL_PROFILE";
if (settings().oclVersion_ == OpenCL20) {
if (settings().oclVersion_ >= OpenCL20) {
info_.version_ = "OpenCL 2.0 " AMD_PLATFORM_INFO;
info_.oclcVersion_ = "OpenCL C 2.0 ";
info_.spirVersions_ = "1.2";
@@ -958,7 +958,7 @@ bool Device::create(CALuint ordinal, CALuint numOfDevices) {
compiler_ = aclCompilerInit(&opts, NULL);
}
if (settings().hsail_ || (settings().oclVersion_ == OpenCL20)) {
if (settings().hsail_ || (settings().oclVersion_ >= OpenCL20)) {
if (NULL == hsaCompiler_) {
const char* library = getenv("HSA_COMPILER_LIBRARY");
aclCompilerOptions opts = {
@@ -1068,7 +1068,7 @@ bool Device::initializeHeapResources() {
if (settings().ciPlus_) {
const char* CL20extraBlits = NULL;
const char* ocl20 = NULL;
if (settings().oclVersion_ == OpenCL20) {
if (settings().oclVersion_ >= OpenCL20) {
CL20extraBlits = SchedulerSourceCode;
ocl20 = "-cl-std=CL2.0";
}