From a76adff9c720dbb0c086e4c70451ea67993c3d2b Mon Sep 17 00:00:00 2001
From: foreman
Date: Fri, 27 May 2016 12:25:43 -0400
Subject: [PATCH] P4 to Git Change 1273850 by smekhano@stas-rampitec-hsa on
2016/05/27 12:10:58
SWDEV-85602 - HSA HLC: remove gblobal variable HLC_Max_WG_Size and pass info as an option
Testing: smoke, precheckin
Reviewed by Evgeny Mankov
Affected files ...
... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/linker.cpp#147 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/v0_8/if_acl.cpp#94 edit
... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/HSAIL/HSAILISelLowering.cpp#117 edit
[ROCm/clr commit: 95bb95fdea058d6458192607026cec05b57f3f4b]
---
.../clr/rocclr/compiler/lib/backends/common/linker.cpp | 7 -------
.../rocclr/compiler/lib/backends/common/v0_8/if_acl.cpp | 3 ++-
2 files changed, 2 insertions(+), 8 deletions(-)
diff --git a/projects/clr/rocclr/compiler/lib/backends/common/linker.cpp b/projects/clr/rocclr/compiler/lib/backends/common/linker.cpp
index d742c12e01..f914d945d1 100644
--- a/projects/clr/rocclr/compiler/lib/backends/common/linker.cpp
+++ b/projects/clr/rocclr/compiler/lib/backends/common/linker.cpp
@@ -122,12 +122,6 @@
#endif
#define DEBUG_TYPE "ocl_linker"
-#if !defined(LEGACY_COMPLIB)
-namespace llvm {
- extern unsigned HLC_Max_WG_Size;
-}
-#endif
-
namespace AMDSpir {
extern void replaceTrivialFunc(llvm::Module& M);
}
@@ -599,7 +593,6 @@ amdcl::OCLLinker::link(llvm::Module* input, std::vector &libs)
setFP32RoundDivideSqrt(Options()->oVariables->FP32RoundDivideSqrt);
setUseNative(Options()->oVariables->OptUseNative);
setDenormsAreZero(Options()->oVariables->DenormsAreZero);
- llvm::HLC_Max_WG_Size = 2048; // Maximum HW supported workgroup size
setUniformWorkGroupSize(Options()->oVariables->UniformWorkGroupSize);
setHaveFastFMA32(chip == "Cypress"
|| chip == "Cayman"
diff --git a/projects/clr/rocclr/compiler/lib/backends/common/v0_8/if_acl.cpp b/projects/clr/rocclr/compiler/lib/backends/common/v0_8/if_acl.cpp
index 172214cb74..c5fe2bcda7 100644
--- a/projects/clr/rocclr/compiler/lib/backends/common/v0_8/if_acl.cpp
+++ b/projects/clr/rocclr/compiler/lib/backends/common/v0_8/if_acl.cpp
@@ -610,7 +610,8 @@ OCLLinkPhase(
}
const char* argv[] = { "",
"-loop-unswitch-threshold=0",
- "-binomial-coefficient-limit-bitwidth=64"
+ "-binomial-coefficient-limit-bitwidth=64",
+ "-hsail-max-wg-size=2048"
};
aclLink->setContext(ctx);