P4 to Git Change 1135675 by atimofee@atimofee-hsa on 2015/03/30 10:03:20
ECR #333753 - HSA HLC: add query fast_fma32 chip capability Affected files ... ... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/compiler_stage.hpp#12 edit ... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/linker.cpp#124 edit ... //depot/stg/opencl/drivers/opencl/compiler/llvm/include/llvm/AMDLLVMContextHook.h#25 edit ... //depot/stg/opencl/drivers/opencl/compiler/llvm/include/llvm/AMDResolveLinker.h#4 edit ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Linker/AMDResolveLinker.cpp#8 edit ... //depot/stg/opencl/drivers/opencl/compiler/llvm/tools/llvm-link/llvm-link.cpp#52 edit ... //depot/stg/opencl/drivers/opencl/compiler/llvm32/include/llvm/AMDLLVMContextHook.h#3 edit ... //depot/stg/opencl/drivers/opencl/compiler/llvm32/include/llvm/AMDResolveLinker.h#3 edit ... //depot/stg/opencl/drivers/opencl/compiler/llvm32/lib/Linker/AMDResolveLinker.cpp#3 edit ... //depot/stg/opencl/drivers/opencl/compiler/llvm32/tools/llvm-link/llvm-link.cpp#3 edit ... //depot/stg/opencl/drivers/opencl/tests/hsa/src/ocl/features/have_fast_fma32/have_fast_fma32.cl#1 add ... //depot/stg/opencl/drivers/opencl/tests/hsa/src/ocl/features/have_fast_fma32/have_fast_fma32.lua#1 add ... //depot/stg/opencl/drivers/opencl/tests/hsa/tlst/ocl_features.tlst#17 edit
This commit is contained in:
@@ -96,6 +96,7 @@ namespace amdcl
|
||||
void setUseNative(const char * Val) { if(Val) hookup_.amdoptions.OptUseNative = Val; }
|
||||
void setDenormsAreZero(bool Val) { hookup_.amdoptions.DenormsAreZero = Val; }
|
||||
void setUniformWorkGroupSize(bool Val) { hookup_.amdoptions.UniformWorkGroupSize = Val; }
|
||||
void setHaveFastFMA32(bool Val) { hookup_.amdoptions.HaveFastFMA32 = Val; }
|
||||
|
||||
/*! Returns the llvm binary */
|
||||
llvm::Module* LLVMBinary() const { return llvmbinary_; }
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
#include "llvm/AMDFixupKernelModule.h"
|
||||
#include "llvm/AMDResolveLinker.h"
|
||||
#include "llvm/AMDPrelinkOpt.h"
|
||||
#include "llvm/AMDUtils.h"
|
||||
#include "llvm/ADT/Triple.h"
|
||||
#include "llvm/ADT/StringMap.h"
|
||||
#include "llvm/Analysis/AMDLocalArrayUsage.h"
|
||||
@@ -559,6 +558,7 @@ amdcl::OCLLinker::link(llvm::Module* input, std::vector<llvm::Module*> &libs)
|
||||
if (Options()->oVariables->EnableBuildTiming) {
|
||||
time_prelinkopt = amd::Os::timeNanos();
|
||||
}
|
||||
llvm::StringRef chip(aclGetChip(Elf()->target));
|
||||
setGPU(IsGPUTarget);
|
||||
setFiniteMathOnly(Options()->oVariables->FiniteMathOnly);
|
||||
setNoSignedZeros(Options()->oVariables->NoSignedZeros);
|
||||
@@ -571,6 +571,11 @@ amdcl::OCLLinker::link(llvm::Module* input, std::vector<llvm::Module*> &libs)
|
||||
setUseNative(Options()->oVariables->OptUseNative);
|
||||
setDenormsAreZero(Options()->oVariables->DenormsAreZero);
|
||||
setUniformWorkGroupSize(Options()->oVariables->UniformWorkGroupSize);
|
||||
setHaveFastFMA32(chip == "Cypress"
|
||||
|| chip == "Cayman"
|
||||
|| chip == "Tahiti"
|
||||
|| chip == "Hawaii"
|
||||
|| chip == "Carrizo");
|
||||
LLVMBinary()->getContext().setAMDLLVMContextHook(&hookup_);
|
||||
|
||||
std::string clp_errmsg;
|
||||
@@ -602,9 +607,9 @@ amdcl::OCLLinker::link(llvm::Module* input, std::vector<llvm::Module*> &libs)
|
||||
}
|
||||
|
||||
std::string ErrorMessage;
|
||||
|
||||
#ifdef LEGACY_COMPLIB
|
||||
createASICIDFunctions(LLVMBinary());
|
||||
|
||||
#endif // LEGACY_COMPLIB
|
||||
// Link libraries to get every functions that are referenced.
|
||||
std::string ErrorMsg;
|
||||
if (resolveLink(LLVMBinary(), LibMs, &ErrorMsg)) {
|
||||
|
||||
Reference in New Issue
Block a user