P4 to Git Change 1208929 by emankov@em-hsa-amd on 2015/11/09 10:49:06

SWDEV-77584 - ORCA RT: Preparations for enabling HSAIL on OpenCL 1.2 by default. Integrate new algorithm for device program choice.

	[Reasons]
	1. Make the switching change as less as possible.
	2. Give a chance to test HSA_foundation device work on OCL 1.2 beforehand (asked by Nikolay).

	Almost already reviewed:
	http://ocltc.amd.com/reviews/r/8850/

	Additionally:
	1. Linking logic was changed: if the target of one of the binaries is hsail-(64) linking goes through HSAIL, otherwise - through AMDIL. Previously -cl-std=CL2.0 in any of the linking binaries was a criterion for HSAIL, what will be wrong for HSAIL 1.2 after switching. -clang & -edg options are set now to distinguish the path while linking.
	2. -cl-std=CL2.0 as a criterion for HSAIL was returned back in isHSAILProgram() method; -clang & -edg options were also added as a criterion.

	[ToDo] After enabling HSAIL by default remove -cl-std, -clang & -edg checks from the code.

	[Testing] Pre-checkin
	http://ocltc.amd.com:8111/viewModification.html?modId=61929&personal=true&buildTypeId=&tab=vcsModificationBuilds&show_all_builds=true

	[Reviewers] German Andryeyev, Nikolay Haustov

Affected files ...

... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_program.cpp#39 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/cpu/cpudevice.cpp#279 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/cpu/cpudevice.hpp#93 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/device.hpp#261 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.cpp#534 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.hpp#154 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/hsa_foundation/hsadevice.cpp#47 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/hsa_foundation/hsadevice.hpp#22 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/program.cpp#76 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/program.hpp#38 edit
This commit is contained in:
foreman
2015-11-09 10:56:13 -05:00
parent 6f0457c510
commit 539fef47eb
7 changed files with 161 additions and 53 deletions
+1 -1
View File
@@ -1120,7 +1120,7 @@ Device::partitionByAffinityDomainCacheLevel(
}
device::Program*
Device::createProgram(bool hsail)
Device::createProgram(amd::option::Options* options)
{
Program* cpuProgram = new Program(*this);
if (cpuProgram == NULL) {
+1 -1
View File
@@ -84,7 +84,7 @@ public:
}
//! Compile the given source code.
virtual device::Program* createProgram(bool hsail = false);
virtual device::Program* createProgram(amd::option::Options* options = NULL);
//! Just returns NULL as CPU devices use the host memory
virtual device::Memory* createMemory(amd::Memory& owner) const