P4 to Git Change 1195790 by johtaylo@johtaylo-JTBUILDER03-increment on 2015/09/30 03:00:11

SWDEV-2 - Change OpenCL version number from 1898 to 1899.

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/utils/versions.hpp#1645 edit


[ROCm/clr commit: af1f393ed0]
This commit is contained in:
foreman
2015-09-30 10:03:05 -04:00
parent 2c69b8cf47
commit d47f79a117
3 changed files with 28 additions and 7 deletions
@@ -391,14 +391,20 @@ SPIRVToModule(
acl_error *error)
{
auto compiler = reinterpret_cast<amdcl::LLVMCompilerStage*>(ald);
auto cl = compiler->CL();
auto bin = compiler->Elf();
#ifdef LEGACY_COMPLIB
llvm::report_fatal_error("SPIR-V not supported on legacy compiler lib");
appendLogToCL(compiler->CL(), "SPIR-V not supported on legacy compiler lib");
appendLogToCL(cl, "SPIR-V not supported on legacy compiler lib");
if (error != nullptr) (*error) = ACL_SPIRV_LOAD_FAIL;
return nullptr;
#else
std::string spvImg(image, length);
auto opt = compiler->Options();
/// ToDo: When there are multiple binaries, compiler->Options()
/// cannot carry options specified by environment variables to here
/// but bin->options can. This seems to be related to how runtime
/// sets up aclCompiler options and BIF options.
auto opt = reinterpret_cast<amd::option::Options*>(bin->options);
if (opt->isDumpFlagSet(amd::option::DUMP_SPIRV)) {
std::ofstream ofs(opt->getDumpFileName(".spv"), std::ios::binary);
ofs << spvImg;
@@ -426,14 +432,20 @@ SPIRVToModule(
}
if (!errMsg.empty()) {
appendLogToCL(compiler->CL(), errMsg);
appendLogToCL(cl, errMsg);
}
if (!success || llMod == nullptr) {
if (error != nullptr) (*error) = ACL_SPIRV_LOAD_FAIL;
return nullptr;
}
if (error != nullptr) (*error) = ACL_SUCCESS;
llvm::SmallVector<char, 4096> array;
llvm::raw_svector_ostream outstream(array);
llvm::WriteBitcodeToFile(reinterpret_cast<llvm::Module*>(llMod), outstream);
outstream.flush();
auto errCode = cl->clAPI.insSec(cl, bin, &array[0], array.size(), aclLLVMIR);
if (error != nullptr) (*error) = errCode;
return reinterpret_cast<aclModule*>(llMod);
#endif // LEGACY_COMPLIB
}
@@ -1623,7 +1635,14 @@ if_aclCompile(aclCompiler *cl,
CONDITIONAL_CMP_ASSIGN(cl->feAPI.fini, &AMDILFini, &OCLFini);
CONDITIONAL_CMP_ASSIGN(cl->feAPI.fini, &HSAILFEFini, &OCLFini);
if (from == ACL_TYPE_SPIRV_BINARY) {
cl->feAPI.toModule = &SPIRVToModule;
if (to != ACL_TYPE_LLVMIR_BINARY)
cl->feAPI.toModule = &SPIRVToModule;
else {
cl->feAPI.toISA = NULL;
cl->feAPI.toIR = &SPIRVToModule;
start = 0;
stop = 1;
}
} else if (from == ACL_TYPE_RSLLVMIR_BINARY) {
cl->feAPI.toModule = &RSLLVMIRToModule;
} else {
@@ -1255,6 +1255,7 @@ Options::Options() :
oVariables(NULL),
clcOptions(),
llvmOptions(),
kernelArgAlign(0),
basename_max(0),
OptionsLog(),
flagsSize (((OID_LAST + 31)/32) * 32),
@@ -1264,7 +1265,8 @@ Options::Options() :
dumpFileRoot(),
currKernelName(NULL),
encryptCode(0),
MemoryHandles()
MemoryHandles(),
libraryType_(amd::LibraryUndefined)
{
oVariables = new OptionVariables();
::memset(flags, 0, sizeof(flags));
@@ -12,7 +12,7 @@
#endif // AMD_PLATFORM_NAME
#ifndef AMD_PLATFORM_BUILD_NUMBER
# define AMD_PLATFORM_BUILD_NUMBER 1898
# define AMD_PLATFORM_BUILD_NUMBER 1899
#endif // AMD_PLATFORM_BUILD_NUMBER
#ifndef AMD_PLATFORM_REVISION_NUMBER