diff --git a/rocclr/compiler/lib/backends/common/compiler_stage.hpp b/rocclr/compiler/lib/backends/common/compiler_stage.hpp index 6884f57d00..1b69a9c7a3 100644 --- a/rocclr/compiler/lib/backends/common/compiler_stage.hpp +++ b/rocclr/compiler/lib/backends/common/compiler_stage.hpp @@ -97,6 +97,7 @@ namespace amdcl void setDenormsAreZero(bool Val) { hookup_.amdoptions.DenormsAreZero = Val; } void setUniformWorkGroupSize(bool Val) { hookup_.amdoptions.UniformWorkGroupSize = Val; } void setHaveFastFMA32(bool Val) { hookup_.amdoptions.HaveFastFMA32 = Val; } + void setISAVersion(int Val) { hookup_.amdoptions.ISAVersion = Val; } /*! Returns the llvm binary */ llvm::Module* LLVMBinary() const { return llvmbinary_; } diff --git a/rocclr/compiler/lib/backends/common/linker.cpp b/rocclr/compiler/lib/backends/common/linker.cpp index 307f6a5e4b..4d66c0061b 100644 --- a/rocclr/compiler/lib/backends/common/linker.cpp +++ b/rocclr/compiler/lib/backends/common/linker.cpp @@ -750,6 +750,12 @@ amdcl::OCLLinker::link(llvm::Module* input, std::vector &libs) || chip == "Hawaii" || chip == "Carrizo" || chip == ""); + setISAVersion((chip == "Hawaii") ? 701 : + ((chip == "Iceland" || chip == "Tonga") ? 800 : + ((chip == "Carrizo") ? 801 : + ((chip == "Fiji" || chip == "Baffin" || chip == "Ellesmere") ? 804 : + ((chip == "Stoney") ? 810 : + ((chip == "") ? 900 : 700)))))); LLVMBinary()->getContext().setAMDLLVMContextHook(&hookup_); std::string clp_errmsg;