P4 to Git Change 1483021 by lmoriche@lmoriche_opencl_dev2 on 2017/11/15 21:49:30
SWDEV-118564 - [OCL-LC-ROCm] Disable HSAILProgram and HSAILKernel if the compiler library is not available. Affected files ... ... //depot/stg/opencl/drivers/opencl/opencldefs#222 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/device.cpp#214 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/roccompiler.cpp#39 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocdevice.cpp#76 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rockernel.cpp#31 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rockernel.hpp#18 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocprogram.cpp#76 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocprogram.hpp#31 edit ... //depot/stg/opencl/drivers/opencl/runtime/platform/program.cpp#89 edit
Цей коміт міститься в:
@@ -190,6 +190,7 @@ Device::~Device() {
|
||||
}
|
||||
}
|
||||
bool NullDevice::initCompiler(bool isOffline) {
|
||||
#if defined(WITH_COMPILER_LIB)
|
||||
// Initialize the compiler handle if has already not been initialized
|
||||
// This is destroyed in Device::teardown
|
||||
acl_error error;
|
||||
@@ -207,10 +208,12 @@ bool NullDevice::initCompiler(bool isOffline) {
|
||||
#endif // !defined(WITH_LIGHTNING_COMPILER)
|
||||
}
|
||||
}
|
||||
#endif // defined(WITH_COMPILER_LIB)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool NullDevice::destroyCompiler() {
|
||||
#if defined(WITH_COMPILER_LIB)
|
||||
if (compilerHandle_ != nullptr) {
|
||||
acl_error error = aclCompilerFini(compilerHandle_);
|
||||
if (error != ACL_SUCCESS) {
|
||||
@@ -218,6 +221,7 @@ bool NullDevice::destroyCompiler() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
#endif // defined(WITH_COMPILER_LIB)
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -665,7 +669,11 @@ bool Device::create() {
|
||||
}
|
||||
|
||||
device::Program* NullDevice::createProgram(amd::option::Options* options) {
|
||||
#if defined(WITH_COMPILER_LIB)
|
||||
return new roc::HSAILProgram(*this);
|
||||
#else // !defined(WITH_COMPILER_LIB)
|
||||
return NULL;
|
||||
#endif // !defined(WITH_COMPILER_LIB)
|
||||
}
|
||||
|
||||
device::Program* Device::createProgram(amd::option::Options* options) {
|
||||
@@ -674,7 +682,9 @@ device::Program* Device::createProgram(amd::option::Options* options) {
|
||||
return new roc::LightningProgram(*this);
|
||||
}
|
||||
#endif // defined(WITH_LIGHTNING_COMPILER)
|
||||
#if defined(WITH_COMPILER_LIB)
|
||||
return new roc::HSAILProgram(*this);
|
||||
#endif // defined(WITH_COMPILER_LIB)
|
||||
}
|
||||
|
||||
hsa_status_t Device::iterateGpuMemoryPoolCallback(hsa_amd_memory_pool_t pool, void* data) {
|
||||
|
||||
Посилання в новій задачі
Заблокувати користувача