From d6f7ddd5c5c384a94d97db5c7bbd8164e93f776a Mon Sep 17 00:00:00 2001
From: foreman
Date: Wed, 21 Sep 2016 20:43:02 -0400
Subject: [PATCH] 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: 0dd6aae9269742f7179fe13d11b29fded8852e92]
---
projects/clr/rocclr/runtime/device/rocm/roccompiler.cpp | 7 +++----
projects/clr/rocclr/runtime/device/rocm/rocdevice.cpp | 9 +++++----
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/projects/clr/rocclr/runtime/device/rocm/roccompiler.cpp b/projects/clr/rocclr/runtime/device/rocm/roccompiler.cpp
index d1bbe6804e..05fa1fdc20 100644
--- a/projects/clr/rocclr/runtime/device/rocm/roccompiler.cpp
+++ b/projects/clr/rocclr/runtime/device/rocm/roccompiler.cpp
@@ -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_ +=
diff --git a/projects/clr/rocclr/runtime/device/rocm/rocdevice.cpp b/projects/clr/rocclr/runtime/device/rocm/rocdevice.cpp
index d9ed605972..dca0a4188a 100644
--- a/projects/clr/rocclr/runtime/device/rocm/rocdevice.cpp
+++ b/projects/clr/rocclr/runtime/device/rocm/rocdevice.cpp
@@ -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,