From f398248c2a229d8ac63c5f08050cd756e799ce76 Mon Sep 17 00:00:00 2001
From: foreman
Date: Mon, 18 Sep 2017 17:12:05 -0400
Subject: [PATCH] P4 to Git Change 1460106 by wchau@wchau_OCL_boltzmann on
2017/09/18 15:29:29
SWDEV-120036 - Supporting the cl_amd_device_attribute_query on the ROC device - Back out changelist 1459984
- not all device attributes are supported, will re-submit the changes when every attribute is supported.
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocdevice.cpp#64 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocsettings.cpp#26 edit
[ROCm/clr commit: fb18f128c962b520d5c2156eb929aff519415e6c]
---
.../rocclr/runtime/device/rocm/rocdevice.cpp | 39 +++++++------------
.../runtime/device/rocm/rocsettings.cpp | 2 -
2 files changed, 15 insertions(+), 26 deletions(-)
diff --git a/projects/clr/rocclr/runtime/device/rocm/rocdevice.cpp b/projects/clr/rocclr/runtime/device/rocm/rocdevice.cpp
index 691831c2ab..6ed491f791 100644
--- a/projects/clr/rocclr/runtime/device/rocm/rocdevice.cpp
+++ b/projects/clr/rocclr/runtime/device/rocm/rocdevice.cpp
@@ -1093,35 +1093,26 @@ bool Device::populateOCLDeviceConstants() {
#endif // !defined(WITH_LIGHTNING_COMPILER)
}
- if (settings().checkExtension(ClAmdDeviceAttributeQuery)) {
- info_.simdPerCU_ = deviceInfo_.simdPerCU_;
- info_.simdWidth_ = deviceInfo_.simdWidth_;
- info_.simdInstructionWidth_ = deviceInfo_.simdInstructionWidth_;
+ //if (settings().checkExtension(ClAmdDeviceAttributeQuery)) {
+ //info_.simdPerCU_ = deviceInfo_.simdPerCU_;
+ //info_.simdWidth_ = deviceInfo_.simdWidth_;
+ //info_.simdInstructionWidth_ = deviceInfo_.simdInstructionWidth_;
if (HSA_STATUS_SUCCESS !=
hsa_agent_get_info(_bkendDevice, HSA_AGENT_INFO_WAVEFRONT_SIZE, &info_.wavefrontWidth_)) {
return false;
}
- if (HSA_STATUS_SUCCESS !=
- hsa_agent_get_info(_bkendDevice, (hsa_agent_info_t)HSA_AMD_AGENT_INFO_MEMORY_WIDTH, &info_.globalMemChannels_)) {
- return false;
- }
- info_.globalMemChannelBanks_ = 4;
- info_.globalMemChannelBankWidth_ = deviceInfo_.memChannelBankWidth_;
- info_.localMemSizePerCU_ = deviceInfo_.localMemSizePerCU_;
- info_.localMemBanks_ = deviceInfo_.localMemBanks_;
+ //info_.globalMemChannels_ = palProp.gpuMemoryProperties.performance.vramBusBitWidth / 32;
+ //info_.globalMemChannelBanks_ = 4;
+ //info_.globalMemChannelBankWidth_ = deviceInfo_.memChannelBankWidth_;
+ //info_.localMemSizePerCU_ = deviceInfo_.localMemSizePerCU_;
+ //info_.localMemBanks_ = deviceInfo_.localMemBanks_;
info_.gfxipVersion_ = deviceInfo_.gfxipVersion_;
- if (HSA_STATUS_SUCCESS !=
- hsa_agent_get_info(_bkendDevice, HSA_AGENT_INFO_QUEUES_MAX, &info_.numAsyncQueues_)) {
- return false;
- }
- info_.numRTQueues_ = info_.numAsyncQueues_;
- if (HSA_STATUS_SUCCESS !=
- hsa_agent_get_info(_bkendDevice, (hsa_agent_info_t)HSA_AMD_AGENT_INFO_COMPUTE_UNIT_COUNT, &info_.numRTCUs_)) {
- return false;
- }
- //TODO: set to true once thread trace support is available
- info_.threadTraceEnable_ = false;
- }
+ //info_.numAsyncQueues_ = numComputeRings;
+ //info_.numRTQueues_ = numExclusiveComputeRings;
+ //info_.numRTCUs_ = palProp.engineProperties[Pal::EngineTypeExclusiveCompute].maxNumDedicatedCu;
+ //info_.threadTraceEnable_ = settings().threadTraceEnable_;
+ //}
+
return true;
}
diff --git a/projects/clr/rocclr/runtime/device/rocm/rocsettings.cpp b/projects/clr/rocclr/runtime/device/rocm/rocsettings.cpp
index dfab1f256f..94e1e4f666 100644
--- a/projects/clr/rocclr/runtime/device/rocm/rocsettings.cpp
+++ b/projects/clr/rocclr/runtime/device/rocm/rocsettings.cpp
@@ -101,8 +101,6 @@ bool Settings::create(bool fullProfile, int gfxipVersion) {
if (MesaInterop::Supported()) {
enableExtension(ClKhrGlSharing);
}
- // Enable platform extension
- enableExtension(ClAmdDeviceAttributeQuery);
// Enable KHR double precision extension
enableExtension(ClKhrFp64);