P4 to Git Change 1191906 by yaxunl@yaxunl_stg_win50 on 2015/09/17 20:52:47
ECR #354633 - SPIR-V: Always create HSAIL device program for SPIR-V since AMDIL path does not support it due to LLVM version.
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/device/cpu/cpudevice.cpp#276 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/cpu/cpudevice.hpp#92 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/device.hpp#254 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.cpp#524 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.hpp#149 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/hsa/hsadevice.cpp#94 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/hsa/hsadevice.hpp#50 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/hsa_foundation/hsadevice.cpp#39 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/hsa_foundation/hsadevice.hpp#17 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/program.cpp#69 edit
[ROCm/clr commit: ad1eb8f858]
This commit is contained in:
@@ -1115,7 +1115,7 @@ Device::partitionByAffinityDomainCacheLevel(
|
||||
}
|
||||
|
||||
device::Program*
|
||||
Device::createProgram(int oclVer)
|
||||
Device::createProgram(bool hsail)
|
||||
{
|
||||
Program* cpuProgram = new Program(*this);
|
||||
if (cpuProgram == NULL) {
|
||||
|
||||
@@ -84,7 +84,7 @@ public:
|
||||
}
|
||||
|
||||
//! Compile the given source code.
|
||||
virtual device::Program* createProgram(int oclVer = 120);
|
||||
virtual device::Program* createProgram(bool hsail = false);
|
||||
|
||||
//! Just returns NULL as CPU devices use the host memory
|
||||
virtual device::Memory* createMemory(amd::Memory& owner) const
|
||||
|
||||
@@ -1556,7 +1556,7 @@ public:
|
||||
) = 0;
|
||||
|
||||
//! Compile the given source code.
|
||||
virtual device::Program* createProgram(int oclVer = 120) = 0;
|
||||
virtual device::Program* createProgram(bool hsail = false) = 0;
|
||||
|
||||
//! Allocate a chunk of device memory as a cache for a CL memory object
|
||||
virtual device::Memory* createMemory(Memory& owner) const = 0;
|
||||
|
||||
@@ -205,10 +205,10 @@ NullDevice::create(CALtarget target)
|
||||
}
|
||||
|
||||
device::Program*
|
||||
NullDevice::createProgram(int oclVer)
|
||||
NullDevice::createProgram(bool hsail)
|
||||
{
|
||||
device::Program* nullProgram;
|
||||
if (settings().hsail_ || (oclVer == 200)) {
|
||||
if (settings().hsail_ || hsail) {
|
||||
nullProgram = new HSAILProgram(*this);
|
||||
}
|
||||
else {
|
||||
@@ -1064,10 +1064,10 @@ Device::createVirtualDevice(
|
||||
}
|
||||
|
||||
device::Program*
|
||||
Device::createProgram(int oclVer)
|
||||
Device::createProgram(bool hsail)
|
||||
{
|
||||
device::Program* gpuProgram;
|
||||
if (settings().hsail_ || (oclVer == 200)) {
|
||||
if (settings().hsail_ || hsail) {
|
||||
gpuProgram = new HSAILProgram(*this);
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -67,7 +67,7 @@ public:
|
||||
) { return NULL; }
|
||||
|
||||
//! Compile the given source code.
|
||||
virtual device::Program* createProgram(int oclVer = 120);
|
||||
virtual device::Program* createProgram(bool hsail = false);
|
||||
|
||||
//! Just returns NULL for the dummy device
|
||||
virtual device::Memory* createMemory(amd::Memory& owner) const { return NULL; }
|
||||
@@ -430,7 +430,7 @@ public:
|
||||
) const;
|
||||
|
||||
//! Create the device program.
|
||||
virtual device::Program* createProgram(int oclVer = 120);
|
||||
virtual device::Program* createProgram(bool hsail = false);
|
||||
|
||||
//! Attempt to bind with external graphics API's device/context
|
||||
virtual bool bindExternalDevice(
|
||||
|
||||
@@ -415,12 +415,12 @@ Device::getOclHsaMemory(amd::Memory* mem) const
|
||||
}
|
||||
|
||||
device::Program*
|
||||
NullDevice::createProgram(int oclVer) {
|
||||
NullDevice::createProgram(bool hsail) {
|
||||
return new oclhsa::FSAILProgram(*this);
|
||||
}
|
||||
|
||||
device::Program*
|
||||
Device::createProgram(int oclVer) {
|
||||
Device::createProgram(bool hsail) {
|
||||
return new oclhsa::FSAILProgram(*this);
|
||||
}
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@ public:
|
||||
aclCompiler *compiler() const { return compilerHandle_; }
|
||||
|
||||
//! Construct an HSAIL program object from the ELF assuming it is valid
|
||||
virtual device::Program *createProgram(int oclVer = 120);
|
||||
virtual device::Program *createProgram(bool hsail = false);
|
||||
|
||||
const AMDDeviceInfo& deviceInfo() const {
|
||||
return deviceInfo_;
|
||||
@@ -246,7 +246,7 @@ public:
|
||||
amd::CommandQueue* queue = NULL);
|
||||
|
||||
//! Construct an HSAIL program object from the ELF assuming it is valid
|
||||
virtual device::Program *createProgram(int oclVer = 120);
|
||||
virtual device::Program *createProgram(bool hsail = false);
|
||||
|
||||
virtual device::Memory *createMemory(amd::Memory &owner) const;
|
||||
|
||||
|
||||
@@ -63,7 +63,8 @@ Program::addDeviceProgram(Device& device, const void* image, size_t length, int
|
||||
return CL_SUCCESS;
|
||||
}
|
||||
|
||||
device::Program* program = rootDev.createProgram(oclVer);
|
||||
bool hsail = (oclVer >= 200) || isIL_;
|
||||
device::Program* program = rootDev.createProgram(hsail);
|
||||
if (program == NULL) {
|
||||
return CL_OUT_OF_HOST_MEMORY;
|
||||
}
|
||||
@@ -92,7 +93,7 @@ Program::addDeviceProgram(Device& device, const void* image, size_t length, int
|
||||
|
||||
devicePrograms_[&rootDev] = program;
|
||||
|
||||
program = rootDev.createProgram(oclVer);
|
||||
program = rootDev.createProgram(hsail);
|
||||
if (program == NULL) {
|
||||
return CL_OUT_OF_HOST_MEMORY;
|
||||
}
|
||||
|
||||
مرجع در شماره جدید
Block a user