From c4717cb5683fbbe17b61f29792a6a549c0f39b02 Mon Sep 17 00:00:00 2001
From: foreman
Date: Mon, 4 Aug 2014 14:08:25 -0400
Subject: [PATCH] P4 to Git Change 1062579 by
jgolds@jgolds_MSDNfractal5_opencl2 on 2014/08/04 14:01:10
ECR #304775 - Allow disabling of the CPU device when CPU_MAX_COMPUTE_UNITS is 0.
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/device/cpu/cpudevice.cpp#265 edit
[ROCm/clr commit: b9d45ad9c5f62bc84c0d4c9feddf583a881350c6]
---
projects/clr/rocclr/runtime/device/cpu/cpudevice.cpp | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/projects/clr/rocclr/runtime/device/cpu/cpudevice.cpp b/projects/clr/rocclr/runtime/device/cpu/cpudevice.cpp
index 0853eac3b0..b9435b9508 100644
--- a/projects/clr/rocclr/runtime/device/cpu/cpudevice.cpp
+++ b/projects/clr/rocclr/runtime/device/cpu/cpudevice.cpp
@@ -54,6 +54,10 @@ Device::tearDown()
bool
Device::init()
{
+ // Allow disabling of the CPU device
+ if (CPU_MAX_COMPUTE_UNITS == 0)
+ return false;
+
const char *library = getenv("COMPILER_LIBRARY");
aclCompilerOptions opts = {
sizeof(aclCompilerOptions_0_8),