From f676e86cda35573c4a71beff17eb7b2f070add38 Mon Sep 17 00:00:00 2001 From: foreman Date: Mon, 26 Oct 2015 12:07:53 -0400 Subject: [PATCH] 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 --- rocclr/runtime/platform/program.cpp | 8 ++++---- rocclr/runtime/platform/program.hpp | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/rocclr/runtime/platform/program.cpp b/rocclr/runtime/platform/program.cpp index 4ed2709ecf..e8fcf0f7e8 100644 --- a/rocclr/runtime/platform/program.cpp +++ b/rocclr/runtime/platform/program.cpp @@ -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()) { diff --git a/rocclr/runtime/platform/program.hpp b/rocclr/runtime/platform/program.hpp index e1fccc5054..1793391d2a 100644 --- a/rocclr/runtime/platform/program.hpp +++ b/rocclr/runtime/platform/program.hpp @@ -81,7 +81,7 @@ private: SharedReference 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) { }