9a4720452f
ECR #304775 - initial work on ocml Affected files ... ... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/library.cpp#17 edit ... //depot/stg/opencl/drivers/opencl/compiler/llvm/include/llvm/AMDResolveLinker.h#5 edit ... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Linker/AMDResolveLinker.cpp#9 edit ... //depot/stg/opencl/drivers/opencl/library/Makefile#25 edit ... //depot/stg/opencl/drivers/opencl/library/build/Makefile.library#44 edit ... //depot/stg/opencl/drivers/opencl/library/hsa/gcn/src/math32/ldexpF.cl#3 delete ... //depot/stg/opencl/drivers/opencl/library/hsa/hsail-amd-ci/src/math32/exp10F.cl#3 delete ... //depot/stg/opencl/drivers/opencl/library/hsa/hsail-amd-ci/src/math32/exp2F.cl#3 delete ... //depot/stg/opencl/drivers/opencl/library/hsa/hsail-amd-ci/src/math32/expF.cl#3 delete ... //depot/stg/opencl/drivers/opencl/library/hsa/hsail-amd-ci/src/math32/log10F.cl#3 delete ... //depot/stg/opencl/drivers/opencl/library/hsa/hsail-amd-ci/src/math32/log2F.cl#2 delete ... //depot/stg/opencl/drivers/opencl/library/hsa/hsail-amd-ci/src/math32/logF.cl#3 delete ... //depot/stg/opencl/drivers/opencl/library/hsa/hsail-amd-ci/src/math32/rsqrtF.cl#2 delete ... //depot/stg/opencl/drivers/opencl/library/hsa/hsail-amd-ci/src/math32/sqrtF.cl#2 delete ... //depot/stg/opencl/drivers/opencl/library/hsa/hsail/src/math32/acosF.cl#2 edit ... //depot/stg/opencl/drivers/opencl/library/hsa/hsail/src/math32/acoshF.cl#2 edit ... //depot/stg/opencl/drivers/opencl/library/hsa/hsail/src/math32/acospiF.cl#2 edit ... //depot/stg/opencl/drivers/opencl/library/hsa/hsail/src/math32/asinF.cl#2 edit ... //depot/stg/opencl/drivers/opencl/library/hsa/hsail/src/math32/asinhF.cl#2 edit ... //depot/stg/opencl/drivers/opencl/library/hsa/hsail/src/math32/asinpiF.cl#2 edit ... //depot/stg/opencl/drivers/opencl/library/hsa/hsail/src/math32/atan2F.cl#3 edit ... //depot/stg/opencl/drivers/opencl/library/hsa/hsail/src/math32/atan2piF.cl#3 edit ... //depot/stg/opencl/drivers/opencl/library/hsa/hsail/src/math32/atanF.cl#2 edit ... //depot/stg/opencl/drivers/opencl/library/hsa/hsail/src/math32/atanhF.cl#2 edit ... //depot/stg/opencl/drivers/opencl/library/hsa/hsail/src/math32/atanpiF.cl#2 edit ... //depot/stg/opencl/drivers/opencl/library/hsa/hsail/src/math32/cbrtF.cl#2 edit ... //depot/stg/opencl/drivers/opencl/library/hsa/hsail/src/math32/ceilF.cl#3 edit ... //depot/stg/opencl/drivers/opencl/library/hsa/hsail/src/math32/copysignF.cl#4 edit ... //depot/stg/opencl/drivers/opencl/library/hsa/hsail/src/math32/cosF.cl#2 edit ... //depot/stg/opencl/drivers/opencl/library/hsa/hsail/src/math32/coshF.cl#2 edit ... //depot/stg/opencl/drivers/opencl/library/hsa/hsail/src/math32/cospiF.cl#2 edit ... //depot/stg/opencl/drivers/opencl/library/hsa/hsail/src/math32/erfF.cl#2 edit ... //depot/stg/opencl/drivers/opencl/library/hsa/hsail/src/math32/erfcF.cl#2 edit ... //depot/stg/opencl/drivers/opencl/library/hsa/hsail/src/math32/exp10F.cl#2 edit ... //depot/stg/opencl/drivers/opencl/library/hsa/hsail/src/math32/exp2F.cl#3 edit ... //depot/stg/opencl/drivers/opencl/library/hsa/hsail/src/math32/expF.cl#3 edit ... //depot/stg/opencl/drivers/opencl/library/hsa/hsail/src/math32/expm1F.cl#2 edit ... //depot/stg/opencl/drivers/opencl/library/hsa/hsail/src/math32/fabsF.cl#3 edit ... //depot/stg/opencl/drivers/opencl/library/hsa/hsail/src/math32/fdimF.cl#2 edit ... //depot/stg/opencl/drivers/opencl/library/hsa/hsail/src/math32/floorF.cl#3 edit ... //depot/stg/opencl/drivers/opencl/library/hsa/hsail/src/math32/fmaF.cl#2 edit ... //depot/stg/opencl/drivers/opencl/library/hsa/hsail/src/math32/fmodF.cl#2 edit ... //depot/stg/opencl/drivers/opencl/library/hsa/hsail/src/math32/fractF.cl#5 edit ... //depot/stg/opencl/drivers/opencl/library/hsa/hsail/src/math32/frexpF.cl#3 edit ... //depot/stg/opencl/drivers/opencl/library/hsa/hsail/src/math32/hypotF.cl#2 edit ... //depot/stg/opencl/drivers/opencl/library/hsa/hsail/src/math32/ilogbF.cl#2 edit ... //depot/stg/opencl/drivers/opencl/library/hsa/hsail/src/math32/ldexpF.cl#2 edit ... //depot/stg/opencl/drivers/opencl/library/hsa/hsail/src/math32/lgammaF.cl#3 edit ... //depot/stg/opencl/drivers/opencl/library/hsa/hsail/src/math32/log10F.cl#2 edit ... //depot/stg/opencl/drivers/opencl/library/hsa/hsail/src/math32/log1pF.cl#2 edit ... //depot/stg/opencl/drivers/opencl/library/hsa/hsail/src/math32/log2F.cl#2 edit ... //depot/stg/opencl/drivers/opencl/library/hsa/hsail/src/math32/logF.cl#2 edit ... //depot/stg/opencl/drivers/opencl/library/hsa/hsail/src/math32/logbF.cl#2 edit ... //depot/stg/opencl/drivers/opencl/library/hsa/hsail/src/math32/madF.cl#2 edit ... //depot/stg/opencl/drivers/opencl/library/hsa/hsail/src/math32/maxmagF.cl#2 edit ... //depot/stg/opencl/drivers/opencl/library/hsa/hsail/src/math32/minmagF.cl#2 edit ... //depot/stg/opencl/drivers/opencl/library/hsa/hsail/src/math32/modfF.cl#3 edit ... //depot/stg/opencl/drivers/opencl/library/hsa/hsail/src/math32/nanF.cl#2 edit ... //depot/stg/opencl/drivers/opencl/library/hsa/hsail/src/math32/nextafterF.cl#2 edit ... //depot/stg/opencl/drivers/opencl/library/hsa/hsail/src/math32/powF.cl#2 edit ... //depot/stg/opencl/drivers/opencl/library/hsa/hsail/src/math32/pownF.cl#2 edit ... //depot/stg/opencl/drivers/opencl/library/hsa/hsail/src/math32/powrF.cl#2 edit ... //depot/stg/opencl/drivers/opencl/library/hsa/hsail/src/math32/remainderF.cl#2 edit ... //depot/stg/opencl/drivers/opencl/library/hsa/hsail/src/math32/remquoF.cl#3 edit ... //depot/stg/opencl/drivers/opencl/library/hsa/hsail/src/math32/rintF.cl#3 edit ... //depot/stg/opencl/drivers/opencl/library/hsa/hsail/src/math32/rootnF.cl#2 edit ... //depot/stg/opencl/drivers/opencl/library/hsa/hsail/src/math32/roundF.cl#2 edit ... //depot/stg/opencl/drivers/opencl/library/hsa/hsail/src/math32/rsqrtF.cl#3 edit ... //depot/stg/opencl/drivers/opencl/library/hsa/hsail/src/math32/sinF.cl#2 edit ... //depot/stg/opencl/drivers/opencl/library/hsa/hsail/src/math32/sincosF.cl#3 edit ... //depot/stg/opencl/drivers/opencl/library/hsa/hsail/src/math32/sinhF.cl#2 edit ... //depot/stg/opencl/drivers/opencl/library/hsa/hsail/src/math32/sinpiF.cl#2 edit ... //depot/stg/opencl/drivers/opencl/library/hsa/hsail/src/math32/sqrtF.cl#3 edit ... //depot/stg/opencl/drivers/opencl/library/hsa/hsail/src/math32/tanF.cl#2 edit ... //depot/stg/opencl/drivers/opencl/library/hsa/hsail/src/math32/tanhF.cl#2 edit ... //depot/stg/opencl/drivers/opencl/library/hsa/hsail/src/math32/tanpiF.cl#2 edit ... //depot/stg/opencl/drivers/opencl/library/hsa/hsail/src/math32/tgammaF.cl#2 edit ... //depot/stg/opencl/drivers/opencl/library/hsa/hsail/src/math32/truncF.cl#2 edit ... //depot/stg/opencl/drivers/opencl/library/ocml/Makefile#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/build/Makefile#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/build/Makefile.ocml#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/inc/ocml.h#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/acosF.cl#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/acoshF.cl#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/acospiF.cl#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/asinF.cl#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/asinhF.cl#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/asinpiF.cl#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/atan2D_table.h#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/atan2F.cl#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/atan2F_table.h#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/atan2piF.cl#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/atanF.cl#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/atanhF.cl#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/atanpiF.cl#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/cbrtD_table.h#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/cbrtF.cl#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/cbrtF_table.h#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/ceilF.cl#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/copysignF.cl#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/cosF.cl#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/coshF.cl#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/cospiF.cl#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/erfF.cl#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/erfcF.cl#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/exp10F.cl#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/exp2F.cl#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/expD_table.h#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/expF.cl#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/expF_base.h#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/expF_table.h#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/expm1F.cl#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/fabsF.cl#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/fdimF.cl#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/floorF.cl#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/fmaF.cl#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/fmaxF.cl#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/fminF.cl#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/fmodF.cl#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/fractF.cl#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/frexpF.cl#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/gcn.h#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/hsail.h#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/hypotF.cl#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/ilogbF.cl#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/isfiniteF.cl#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/isinfF.cl#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/isnanF.cl#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/ldexpF.cl#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/lgammaF.cl#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/lgamma_rF.cl#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/log10F.cl#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/log1pF.cl#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/log2F.cl#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/logD_table.h#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/logF.cl#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/logF_base.h#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/logF_table.h#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/logbF.cl#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/madF.cl#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/mathF.h#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/maxF.cl#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/maxmagF.cl#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/minF.cl#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/minmagF.cl#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/modfF.cl#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/nanF.cl#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/nextafterF.cl#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/pibitsD.h#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/powD_table.h#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/powF.cl#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/powF_base.h#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/pownF.cl#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/powrF.cl#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/privF.h#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/remainderF.cl#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/remainderF_base.h#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/remquoF.cl#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/rintF.cl#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/rootnF.cl#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/roundF.cl#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/rsqrtF.cl#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/rsqrtF_table.h#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/sinF.cl#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/sincosF.cl#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/sincosred2F.cl#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/sincosredF.cl#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/sinhF.cl#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/sinhcoshD_table.h#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/sinhcoshF.cl#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/sinhcoshF_table.h#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/sinpiF.cl#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/sqrtF.cl#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/tables.cl#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/tables.h#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/tanF.cl#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/tanhF.cl#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/tanpiF.cl#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/tanredF.cl#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/tgammaF.cl#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/trigredF.cl#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/trigredF.h#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/trigredlargeF.cl#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/trigredsmallF.cl#1 add ... //depot/stg/opencl/drivers/opencl/library/ocml/src/truncF.cl#1 add ... //depot/stg/opencl/drivers/opencl/tests/hsa/bin/test_driver.pl#8 edit
294 строки
11 KiB
C++
294 строки
11 KiB
C++
|
|
// Copyright (c) 2008 Advanced Micro Devices, Inc. All rights reserved.
|
|
//
|
|
|
|
#include <vector>
|
|
#include <string>
|
|
|
|
#include "top.hpp"
|
|
#include "aclTypes.h"
|
|
#include "library.hpp"
|
|
#include "utils/options.hpp"
|
|
|
|
namespace amd {
|
|
|
|
/*
|
|
Integrated bitcode libraries
|
|
*/
|
|
|
|
// GPU libraries
|
|
#if defined(WITH_TARGET_AMDIL)
|
|
#include "builtins-gpugen-comm.inc"
|
|
#include "builtins-gpugen-diff.gpu.inc"
|
|
#include "builtins-gpugen-diff.gpu-64.inc"
|
|
#include "builtins-gpucommon-comm.inc"
|
|
#include "builtins-gpucommon-diff.gpu.inc"
|
|
#include "builtins-gpucommon-diff.gpu-64.inc"
|
|
#include "builtins-SI-comm.inc"
|
|
#include "builtins-SI-diff.gpu.inc"
|
|
#include "builtins-SI-diff.gpu-64.inc"
|
|
#include "builtins-CI-comm.inc"
|
|
#include "builtins-CI-diff.gpu.inc"
|
|
#include "builtins-CI-diff.gpu-64.inc"
|
|
#endif // WITH_TARGET_AMDIL
|
|
|
|
// CPU libraries
|
|
#if defined(WITH_TARGET_X86)
|
|
#include "builtins-cpugen.x86.inc"
|
|
#include "builtins-cpucommon.x86.inc"
|
|
#include "builtins-avx.x86.inc"
|
|
#include "builtins-fma4.x86.inc"
|
|
#include "builtins-cpugen.x86-64.inc"
|
|
#include "builtins-cpucommon.x86-64.inc"
|
|
#include "builtins-avx.x86-64.inc"
|
|
#include "builtins-fma4.x86-64.inc"
|
|
#endif // WITH_TARGET_X86
|
|
|
|
#if defined(WITH_TARGET_ARM)
|
|
#include "builtins-cpugen.arm.inc"
|
|
#include "builtins-cpucommon.arm.inc"
|
|
#endif // WITH_TARGET_ARM
|
|
|
|
#ifdef WITH_TARGET_HSAIL
|
|
// HSAIL libraries
|
|
#include "builtins-hsail.inc"
|
|
#include "builtins-hsail-amd-ci.inc"
|
|
#include "builtins-gcn.inc"
|
|
#include "builtins-ocml.inc"
|
|
#endif
|
|
|
|
#include <cstdlib>
|
|
// getLibsDesc() : returns a list of libraries that need to be linked with the
|
|
// application. The max number of libraries is defined by
|
|
// enum MAX_NUM_LIBRARY_DESCS in class LibraryDescriptor.
|
|
//
|
|
// Return 0: successful
|
|
// <n>: error happened
|
|
int
|
|
getLibDescs (
|
|
LibrarySelector LibType, // input
|
|
LibraryDescriptor* LibDesc, // output
|
|
int& LibDescSize // output -- LibDesc[0:LibDescSize-1]
|
|
)
|
|
{
|
|
switch (LibType) {
|
|
#if defined(WITH_TARGET_AMDIL)
|
|
case GPU_Library_Evergreen:
|
|
// Library order is important!
|
|
LibDesc[0].start = reinterpret_cast<const char*>
|
|
(builtins_gpucommon_comm);
|
|
LibDesc[0].size = builtins_gpucommon_comm_size;
|
|
LibDesc[1].start = reinterpret_cast<const char*>
|
|
(builtins_gpucommon_diff_gpu);
|
|
LibDesc[1].size = builtins_gpucommon_diff_gpu_size;
|
|
LibDesc[2].start = reinterpret_cast<const char*>
|
|
(builtins_gpugen_comm);
|
|
LibDesc[2].size = builtins_gpugen_comm_size;
|
|
LibDesc[3].start = reinterpret_cast<const char*>
|
|
(builtins_gpugen_diff_gpu);
|
|
LibDesc[3].size = builtins_gpugen_diff_gpu_size;
|
|
LibDescSize = 4;
|
|
break;
|
|
|
|
case GPU_Library_SI:
|
|
// Library order is important!
|
|
LibDesc[0].start = reinterpret_cast<const char*>
|
|
(builtins_SI_comm);
|
|
LibDesc[0].size = builtins_SI_comm_size;
|
|
LibDesc[1].start = reinterpret_cast<const char*>
|
|
(builtins_SI_diff_gpu);
|
|
LibDesc[1].size = builtins_SI_diff_gpu_size;
|
|
LibDesc[2].start = reinterpret_cast<const char*>
|
|
(builtins_gpucommon_comm);
|
|
LibDesc[2].size = builtins_gpucommon_comm_size;
|
|
LibDesc[3].start = reinterpret_cast<const char*>
|
|
(builtins_gpucommon_diff_gpu);
|
|
LibDesc[3].size = builtins_gpucommon_diff_gpu_size;
|
|
LibDesc[4].start = reinterpret_cast<const char*>
|
|
(builtins_gpugen_comm);
|
|
LibDesc[4].size = builtins_gpugen_comm_size;
|
|
LibDesc[5].start = reinterpret_cast<const char*>
|
|
(builtins_gpugen_diff_gpu);
|
|
LibDesc[5].size = builtins_gpugen_diff_gpu_size;
|
|
LibDescSize = 6;
|
|
break;
|
|
|
|
case GPU64_Library_SI:
|
|
// Library order is important!
|
|
LibDesc[0].start = reinterpret_cast<const char*>
|
|
(builtins_SI_comm);
|
|
LibDesc[0].size = builtins_SI_comm_size;
|
|
LibDesc[1].start = reinterpret_cast<const char*>
|
|
(builtins_SI_diff_gpu_64);
|
|
LibDesc[1].size = builtins_SI_diff_gpu_64_size;
|
|
LibDesc[2].start = reinterpret_cast<const char*>
|
|
(builtins_gpucommon_comm);
|
|
LibDesc[2].size = builtins_gpucommon_comm_size;
|
|
LibDesc[3].start = reinterpret_cast<const char*>
|
|
(builtins_gpucommon_diff_gpu_64);
|
|
LibDesc[3].size = builtins_gpucommon_diff_gpu_64_size;
|
|
LibDesc[4].start = reinterpret_cast<const char*>
|
|
(builtins_gpugen_comm);
|
|
LibDesc[4].size = builtins_gpugen_comm_size;
|
|
LibDesc[5].start = reinterpret_cast<const char*>
|
|
(builtins_gpugen_diff_gpu_64);
|
|
LibDesc[5].size = builtins_gpugen_diff_gpu_64_size;
|
|
LibDescSize = 6;
|
|
break;
|
|
|
|
case GPU_Library_CI:
|
|
// Library order is important!
|
|
LibDesc[0].start = reinterpret_cast<const char*>
|
|
(builtins_CI_comm);
|
|
LibDesc[0].size = builtins_CI_comm_size;
|
|
LibDesc[1].start = reinterpret_cast<const char*>
|
|
(builtins_CI_diff_gpu);
|
|
LibDesc[1].size = builtins_CI_diff_gpu_size;
|
|
LibDesc[2].start = reinterpret_cast<const char*>
|
|
(builtins_SI_comm);
|
|
LibDesc[2].size = builtins_SI_comm_size;
|
|
LibDesc[3].start = reinterpret_cast<const char*>
|
|
(builtins_SI_diff_gpu);
|
|
LibDesc[3].size = builtins_SI_diff_gpu_size;
|
|
LibDesc[4].start = reinterpret_cast<const char*>
|
|
(builtins_gpucommon_comm);
|
|
LibDesc[4].size = builtins_gpucommon_comm_size;
|
|
LibDesc[5].start = reinterpret_cast<const char*>
|
|
(builtins_gpucommon_diff_gpu);
|
|
LibDesc[5].size = builtins_gpucommon_diff_gpu_size;
|
|
LibDesc[6].start = reinterpret_cast<const char*>
|
|
(builtins_gpugen_comm);
|
|
LibDesc[6].size = builtins_gpugen_comm_size;
|
|
LibDesc[7].start = reinterpret_cast<const char*>
|
|
(builtins_gpugen_diff_gpu);
|
|
LibDesc[7].size = builtins_gpugen_diff_gpu_size;
|
|
LibDescSize = 8;
|
|
break;
|
|
|
|
case GPU64_Library_CI:
|
|
// Library order is important!
|
|
LibDesc[0].start = reinterpret_cast<const char*>
|
|
(builtins_CI_comm);
|
|
LibDesc[0].size = builtins_CI_comm_size;
|
|
LibDesc[1].start = reinterpret_cast<const char*>
|
|
(builtins_CI_diff_gpu_64);
|
|
LibDesc[1].size = builtins_CI_diff_gpu_64_size;
|
|
LibDesc[2].start = reinterpret_cast<const char*>
|
|
(builtins_SI_comm);
|
|
LibDesc[2].size = builtins_SI_comm_size;
|
|
LibDesc[3].start = reinterpret_cast<const char*>
|
|
(builtins_SI_diff_gpu_64);
|
|
LibDesc[3].size = builtins_SI_diff_gpu_64_size;
|
|
LibDesc[4].start = reinterpret_cast<const char*>
|
|
(builtins_gpucommon_comm);
|
|
LibDesc[4].size = builtins_gpucommon_comm_size;
|
|
LibDesc[5].start = reinterpret_cast<const char*>
|
|
(builtins_gpucommon_diff_gpu_64);
|
|
LibDesc[5].size = builtins_gpucommon_diff_gpu_64_size;
|
|
LibDesc[6].start = reinterpret_cast<const char*>
|
|
(builtins_gpugen_comm);
|
|
LibDesc[6].size = builtins_gpugen_comm_size;
|
|
LibDesc[7].start = reinterpret_cast<const char*>
|
|
(builtins_gpugen_diff_gpu_64);
|
|
LibDesc[7].size = builtins_gpugen_diff_gpu_64_size;
|
|
LibDescSize = 8;
|
|
break;
|
|
|
|
#endif // WITH_TARGET_AMDIL
|
|
|
|
#if defined(WITH_TARGET_X86)
|
|
case CPU64_Library_Generic:
|
|
LibDesc[0].start = reinterpret_cast<const char*>(builtins_cpucommon_x86_64);
|
|
LibDesc[0].size = builtins_cpucommon_x86_64_size;
|
|
LibDesc[1].start = reinterpret_cast<const char*>(builtins_cpugen_x86_64);
|
|
LibDesc[1].size = builtins_cpugen_x86_64_size;
|
|
LibDescSize = 2;
|
|
break;
|
|
|
|
case CPU64_Library_AVX:
|
|
LibDesc[0].start = reinterpret_cast<const char*>(builtins_avx_x86_64);
|
|
LibDesc[0].size = builtins_avx_x86_64_size;
|
|
LibDesc[1].start = reinterpret_cast<const char*>(builtins_cpucommon_x86_64);
|
|
LibDesc[1].size = builtins_cpucommon_x86_64_size;
|
|
LibDesc[2].start = reinterpret_cast<const char*>(builtins_cpugen_x86_64);
|
|
LibDesc[2].size = builtins_cpugen_x86_64_size;
|
|
LibDescSize = 3;
|
|
break;
|
|
|
|
case CPU64_Library_FMA4:
|
|
LibDesc[0].start = reinterpret_cast<const char*>(builtins_fma4_x86_64);
|
|
LibDesc[0].size = builtins_fma4_x86_64_size;
|
|
LibDesc[1].start = reinterpret_cast<const char*>(builtins_avx_x86_64);
|
|
LibDesc[1].size = builtins_avx_x86_64_size;
|
|
LibDesc[2].start = reinterpret_cast<const char*>(builtins_cpucommon_x86_64);
|
|
LibDesc[2].size = builtins_cpucommon_x86_64_size;
|
|
LibDesc[3].start = reinterpret_cast<const char*>(builtins_cpugen_x86_64);
|
|
LibDesc[3].size = builtins_cpugen_x86_64_size;
|
|
LibDescSize = 4;
|
|
break;
|
|
|
|
case CPU_Library_Generic:
|
|
LibDesc[0].start = reinterpret_cast<const char*>(builtins_cpucommon_x86);
|
|
LibDesc[0].size = builtins_cpucommon_x86_size;
|
|
LibDesc[1].start = reinterpret_cast<const char*>(builtins_cpugen_x86);
|
|
LibDesc[1].size = builtins_cpugen_x86_size;
|
|
LibDescSize = 2;
|
|
break;
|
|
|
|
case CPU_Library_AVX:
|
|
LibDesc[0].start = reinterpret_cast<const char*>(builtins_avx_x86);
|
|
LibDesc[0].size = builtins_avx_x86_size;
|
|
LibDesc[1].start = reinterpret_cast<const char*>(builtins_cpucommon_x86);
|
|
LibDesc[1].size = builtins_cpucommon_x86_size;
|
|
LibDesc[2].start = reinterpret_cast<const char*>(builtins_cpugen_x86);
|
|
LibDesc[2].size = builtins_cpugen_x86_size;
|
|
LibDescSize = 3;
|
|
break;
|
|
|
|
case CPU_Library_FMA4:
|
|
LibDesc[0].start = reinterpret_cast<const char*>(builtins_fma4_x86);
|
|
LibDesc[0].size = builtins_fma4_x86_size;
|
|
LibDesc[1].start = reinterpret_cast<const char*>(builtins_avx_x86);
|
|
LibDesc[1].size = builtins_avx_x86_size;
|
|
LibDesc[2].start = reinterpret_cast<const char*>(builtins_cpucommon_x86);
|
|
LibDesc[2].size = builtins_cpucommon_x86_size;
|
|
LibDesc[3].start = reinterpret_cast<const char*>(builtins_cpugen_x86);
|
|
LibDesc[3].size = builtins_cpugen_x86_size;
|
|
LibDescSize = 4;
|
|
break;
|
|
#endif // WITH_TARGET_X86
|
|
|
|
#if defined(WITH_TARGET_ARM)
|
|
case CPU_Library_Generic:
|
|
LibDesc[0].start = reinterpret_cast<const char*>(builtins_cpucommon_arm);
|
|
LibDesc[0].size = builtins_cpucommon_arm_size;
|
|
LibDesc[1].start = reinterpret_cast<const char*>(builtins_cpugen_arm);
|
|
LibDesc[1].size = builtins_cpugen_arm_size;
|
|
LibDescSize = 2;
|
|
break;
|
|
#endif // WITH_TARGET_ARM
|
|
|
|
#if defined(WITH_TARGET_HSAIL)
|
|
case GPU_Library_HSAIL:
|
|
// Library order is important!
|
|
LibDesc[0].start = reinterpret_cast<const char*>(builtins_gcn);
|
|
LibDesc[0].size = builtins_gcn_size;
|
|
LibDesc[1].start = reinterpret_cast<const char*>(builtins_hsail_amd_ci);
|
|
LibDesc[1].size = builtins_hsail_amd_ci_size;
|
|
LibDesc[2].start = reinterpret_cast<const char*>(builtins_hsail);
|
|
LibDesc[2].size = builtins_hsail_size;
|
|
LibDesc[3].start = reinterpret_cast<const char*>(builtins_ocml);
|
|
LibDesc[3].size = builtins_ocml_size;
|
|
LibDescSize = 4;
|
|
break;
|
|
#endif // WITH_TARGET_HSAIL
|
|
|
|
default:
|
|
// Failed
|
|
return 1; //
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
} // namespace amd
|