P4 to Git Change 1083876 by emankov@em-hsa-amd on 2014/10/03 04:25:16

ECR #333753 - HSA RT/Compiler Lib/Performance: Elimination of HSAIL text usage in RT

	Extracting HSAIL from the binary and parsing it for the kernel names in RT were replaced with aclQueryInfo call for RT_KERNEL_NAMES.
	Kernel names are obtained now from the corresponding metadata symbols names, which are already presented in BIF at kernel finalization stage.

	Side effect: performance improvement

	Next Step: Performance: elimination of BRIG disassembling to HSAIL as obligatory stage in Compiler Lib (previously was needed only by RT).

	Testing: pre check-in, ocl conformnace 2.0 (basic, api, compiler, workgroups, device_execution)

	Reviewers: Stanislav Mekhanoshin, German Andryeyev, Brian Sumner

Affected files ...

... //depot/stg/opencl/drivers/opencl/compiler/lib/api/v0_8/acl.cpp#20 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/v0_8/if_acl.cpp#51 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/include/v0_8/aclEnums.h#13 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/loaders/bif/bifbase.cpp#50 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/loaders/bif/bifbase.hpp#22 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/v0_8/libUtils.h#11 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpukernel.cpp#266 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuprogram.cpp#179 edit
... //depot/stg/opencl/drivers/opencl/tests/ocltst/module/complib/CLEnumCheck.cpp#37 edit
Cette révision appartient à :
foreman
2014-10-03 04:30:34 -04:00
Parent 1001028b9b
révision f7c2190e63
5 fichiers modifiés avec 101 ajouts et 62 suppressions
+4 -1
Voir le fichier
@@ -9,6 +9,7 @@
#include "device/gpu/gpusched.hpp"
#include "platform/commandqueue.hpp"
#include "utils/options.hpp"
#include "utils/bif_section_labels.hpp"
#include "acl.h"
#include "SCShadersR678XXCommon.h"
@@ -3513,8 +3514,10 @@ bool
HSAILKernel::init(bool finalize)
{
acl_error error;
const oclBIFSymbolStruct* sym = findBIF30SymStruct(symOpenclKernel);
assert(sym && "symbol not found");
std::string openClKernelName(std::string("&") + sym->str[PRE] + name() + sym->str[POST]);
//compile kernel down to ISA
std::string openClKernelName("&__OpenCL_" + name() + "_kernel");
if (finalize) {
std::string options(compileOptions_.c_str());
options.append(" -just-kernel=");