From 1210448dd2cbbb89e9b08cbffd284f25d3634d05 Mon Sep 17 00:00:00 2001
From: foreman
Date: Wed, 16 Jan 2019 11:32:33 -0500
Subject: [PATCH] P4 to Git Change 1731224 by jatang@jatang_win_pal_lc on
2019/01/16 10:40:44
SWDEV-172202 - Back out changelist 1730757.
Failure in OCLDynamic tests in various TC Sanity tests.
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocdevice.cpp#111 edit
---
rocclr/runtime/device/rocm/rocdevice.cpp | 30 ++++--------------------
1 file changed, 5 insertions(+), 25 deletions(-)
diff --git a/rocclr/runtime/device/rocm/rocdevice.cpp b/rocclr/runtime/device/rocm/rocdevice.cpp
index fc5f84edda..de9b53c9c1 100644
--- a/rocclr/runtime/device/rocm/rocdevice.cpp
+++ b/rocclr/runtime/device/rocm/rocdevice.cpp
@@ -926,30 +926,7 @@ bool Device::populateOCLDeviceConstants() {
assert(group_segment_.handle != 0);
- bool pcie_gen3_atomics_supported = false;
-
for (auto agent: gpu_agents_) {
- hsa_amd_memory_pool_link_info_t link_info={0};
- hsa_amd_memory_pool_access_t access;
-
- if (HSA_STATUS_SUCCESS != hsa_amd_agent_memory_pool_get_info(agent,
- system_segment_,
- HSA_AMD_AGENT_MEMORY_POOL_INFO_LINK_INFO,
- &link_info)) {
- continue;
- }
-
- if (HSA_STATUS_SUCCESS != hsa_amd_agent_memory_pool_get_info(agent,
- system_segment_,
- HSA_AMD_AGENT_MEMORY_POOL_INFO_ACCESS,
- &access)) {
- continue;
- }
-
- if (link_info.atomic_support_64bit && link_info.atomic_support_32bit && (access > 0)) {
- pcie_gen3_atomics_supported = true;
- }
-
if (agent.handle != _bkendDevice.handle) {
hsa_status_t err;
// Can current GPU have access to another GPU memory pool
@@ -1099,8 +1076,11 @@ bool Device::populateOCLDeviceConstants() {
strcpy(info_.driverVersion_, ss.str().c_str());
- if (pcie_gen3_atomics_supported) {
- info_.version_ = "OpenCL " OPENCL_VERSION_STR " ";
+ // Allow testing OpenCL 2.1 features with the OPENCL_VERSION variable. We don't accept OPENCL_VERSION
+ // values other than 210, since the default value of OPENCL_VERSION is 200. Accepting 200 would report
+ // 'OpenCL 2.0' by default.
+ if (OPENCL_VERSION == 210) {
+ info_.version_ = "OpenCL " /*OPENCL_VERSION_STR*/"2.1" " ";
} else {
info_.version_ = "OpenCL " /*OPENCL_VERSION_STR*/"1.2" " ";
}