P4 to Git Change 1203841 by emankov@em-hsa-amd on 2015/10/26 11:47:01
SWDEV-77584 - ORCA RT: Preparations for enabling HSAIL on OpenCL 1.2 by default. Renaming Program::isIL_ to isSPIRV_.
[Reason] Avoiding ambiguity with SPIR, which is also IL, but is supported by legacy AMDIL only, whereas SPIRV is supported only by HSAIL. From OpenCL Program constructor's point it isn't obvious.
[Testing] pre check-in
[Reviewer] German Andryeyev, Yaxun Liu
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/platform/program.cpp#73 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/program.hpp#35 edit
[ROCm/clr commit: f676e86cda]
This commit is contained in:
@@ -48,7 +48,7 @@ Program::addDeviceProgram(Device& device, const void* image, size_t length,
|
||||
{
|
||||
if (image != NULL &&
|
||||
!aclValidateBinaryImage(image, length,
|
||||
isIL_?BINARY_TYPE_SPIRV:BINARY_TYPE_ELF|BINARY_TYPE_LLVM)) {
|
||||
isSPIRV_?BINARY_TYPE_SPIRV:BINARY_TYPE_ELF|BINARY_TYPE_LLVM)) {
|
||||
return CL_INVALID_BINARY;
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ Program::addDeviceProgram(Device& device, const void* image, size_t length,
|
||||
return CL_SUCCESS;
|
||||
}
|
||||
|
||||
device::Program* program = rootDev.createProgram(hsail || isIL_);
|
||||
device::Program* program = rootDev.createProgram(hsail || isSPIRV_);
|
||||
if (program == NULL) {
|
||||
return CL_OUT_OF_HOST_MEMORY;
|
||||
}
|
||||
@@ -205,7 +205,7 @@ Program::compile(
|
||||
}
|
||||
|
||||
if (devProgram->type() == device::Program::TYPE_INTERMEDIATE ||
|
||||
isIL_) {
|
||||
isSPIRV_) {
|
||||
continue;
|
||||
}
|
||||
// We only build a Device-Program once
|
||||
@@ -299,7 +299,7 @@ Program::link(
|
||||
bool hsail = GetOclCVersion(parsedOptions.oVariables->CLStd) >= 200;
|
||||
for (size_t i = 0; i < numInputs; ++i) {
|
||||
Program& inputProgram = *inputPrograms[i];
|
||||
hsail = hsail || inputProgram.isIL_;
|
||||
hsail = hsail || inputProgram.isSPIRV_;
|
||||
deviceprograms_t inputDevProgs = inputProgram.devicePrograms();
|
||||
deviceprograms_t::const_iterator findIt = inputDevProgs.find(*it);
|
||||
if (findIt == inputDevProgs.end()) {
|
||||
|
||||
@@ -81,7 +81,7 @@ private:
|
||||
SharedReference<Context> context_;
|
||||
|
||||
std::string sourceCode_; //!< Strings that make up the source code
|
||||
bool isIL_; //!< The binary image is IL
|
||||
bool isSPIRV_; //!< The binary image is SPIRV
|
||||
devicebinary_t binary_; //!< The binary image, provided by the app
|
||||
symbols_t* symbolTable_; //!< The program's kernels symbol table
|
||||
std::string kernelNames_; //!< The program kernel names
|
||||
@@ -104,10 +104,10 @@ protected:
|
||||
|
||||
public:
|
||||
//! Construct a new program to be compiled from the given source code.
|
||||
Program(Context& context, const std::string& sourceCode, bool isIL = false)
|
||||
Program(Context& context, const std::string& sourceCode, bool isSPIRV = false)
|
||||
: context_(context)
|
||||
, sourceCode_(sourceCode)
|
||||
, isIL_(isIL)
|
||||
, isSPIRV_(isSPIRV)
|
||||
, symbolTable_(NULL)
|
||||
, programLog_()
|
||||
{ }
|
||||
@@ -115,7 +115,7 @@ public:
|
||||
//! Construct a new program associated with a context.
|
||||
Program(Context& context)
|
||||
: context_(context)
|
||||
, isIL_(false)
|
||||
, isSPIRV_(false)
|
||||
, symbolTable_(NULL)
|
||||
{ }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user