From 29f1d090ccf1eae969ed8bb327ecc330fc0e3410 Mon Sep 17 00:00:00 2001
From: foreman
Date: Tue, 30 Aug 2016 11:31:08 -0500
Subject: [PATCH] P4 to Git Change 1308645 by lmoriche@lmoriche_opencl_dev on
2016/08/30 11:58:31
SWDEV-101666 - Disable SDMA transfers in the ROCm virtual device.
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocdevice.cpp#11 edit
---
rocclr/runtime/device/rocm/rocdevice.cpp | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/rocclr/runtime/device/rocm/rocdevice.cpp b/rocclr/runtime/device/rocm/rocdevice.cpp
index 20e724f425..a7d57d3e7f 100644
--- a/rocclr/runtime/device/rocm/rocdevice.cpp
+++ b/rocclr/runtime/device/rocm/rocdevice.cpp
@@ -459,6 +459,12 @@ hsa_status_t Device::iterateAgentCallback(hsa_agent_t agent, void *data) {
}
bool Device::init() {
+#if defined(__linux__)
+ if (amd::Os::getEnvironment("HSA_ENABLE_SDMA").empty()) {
+ ::setenv("HSA_ENABLE_SDMA", "0", false);
+ }
+#endif // defined (__linux__)
+
LogInfo("Initializing HSA stack.");
//Initialize the compiler