P4 to Git Change 1317285 by lmoriche@lmoriche_opencl_dev on 2016/09/21 20:36:55
SWDEV-102540 - Fill the device info_.boardName_ field from the info returned by ROCR's HSA_AMD_AGENT_INFO_PRODUCT_NAME query.
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/roccompiler.cpp#19 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocdevice.cpp#19 edit
[ROCm/clr commit: 0dd6aae926]
This commit is contained in:
@@ -167,10 +167,9 @@ HSAILProgram::compileImpl_LC(
|
||||
if (options->isDumpFlagSet(amd::option::DUMP_CL)) {
|
||||
std::ofstream f(options->getDumpFileName(".cl").c_str(), std::ios::trunc);
|
||||
if(f.is_open()) {
|
||||
f << "/* Original options: " << options->origOptionStr
|
||||
<< "\n Generated options:\n"
|
||||
<< " -c -emit-llvm -target amdgcn--amdhsa -x cl"
|
||||
<< " -include opencl-c.h " << driverOptions
|
||||
f << "/* Compiler options:\n" \
|
||||
"-c -emit-llvm -target amdgcn--amdhsa-opencl -x cl" \
|
||||
" -include opencl-c.h " << driverOptions
|
||||
<< "\n*/\n\n" << sourceCode;
|
||||
} else {
|
||||
buildLog_ +=
|
||||
|
||||
@@ -624,12 +624,13 @@ Device::populateOCLDeviceConstants()
|
||||
::strcpy(info_.name_, oss.str().c_str());
|
||||
|
||||
char device_name[64] = { 0 };
|
||||
if (HSA_STATUS_SUCCESS !=
|
||||
if (HSA_STATUS_SUCCESS ==
|
||||
hsa_agent_get_info(
|
||||
_bkendDevice, HSA_AGENT_INFO_NAME, device_name)) {
|
||||
return false;
|
||||
_bkendDevice,
|
||||
(hsa_agent_info_t)HSA_AMD_AGENT_INFO_PRODUCT_NAME,
|
||||
device_name)) {
|
||||
::strcpy(info_.boardName_, device_name);
|
||||
}
|
||||
::strcpy(info_.boardName_, device_name);
|
||||
|
||||
if (HSA_STATUS_SUCCESS != hsa_agent_get_info(_bkendDevice,
|
||||
HSA_AGENT_INFO_PROFILE,
|
||||
|
||||
Reference in New Issue
Block a user