2
0

P4 to Git Change 1515527 by emankov@em-hsa on 2018/02/13 07:35:08

SWDEV-143465 - Fix crashes while mixed work with hsail and amdil (legacy) paths

	Redirect (where it is possible) ACL API calls from HSAIL lib to legacy AMDIL lib if target is AMDIL.
	For those functions (aclCreateFromBinary, aclReadFromMem), where redirect is impossible, explicit loadLibrary for AMDIL lib and call of corresponding function from AMDIL lib is performed.

	[Reviewed] by Stas (http://ocltc.amd.com/reviews/r/14238)

	[Testing] rga offline for all the targets supported by HSAIL and AMDIL (from Family_SI up to Family_VI):
	tahiti, pitcairn, capeverde, spectre, spooky, kalindi, hawaii, oland, bonaire, hainan, carrizo, iceland, tonga, fiji, stoney, baffin, ellesmere.

Affected files ...

... //depot/stg/opencl/drivers/opencl/compiler/lib/api/v0_8/acl.cpp#45 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/api/v0_8/aclValidation.cpp#8 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/api/v0_8/aclValidation.h#3 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/v0_8/libUtils.cpp#29 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/v0_8/libUtils.h#30 edit


[ROCm/clr commit: a9ac031e6e]
Este cometimento está contido em:
foreman
2018-02-13 07:40:19 -05:00
ascendente e7a7c639f0
cometimento fb67f621b8
2 ficheiros modificados com 8 adições e 0 eliminações
+6
Ver ficheiro
@@ -33,6 +33,8 @@ static const std::string sgfx907 = "AMD:AMDGPU:9:0:7";
static const std::string sgfx1000 = "AMD:AMDGPU:10:0:0";
static const std::string sgfx1001 = "AMD:AMDGPU:10:0:1";
static const std::string legacyLibName = LINUX_ONLY("lib") "amdocl12cl" LP64_SWITCH(LINUX_SWITCH("32", ""), "64") LINUX_SWITCH(".so", ".dll");
// Utility function to set a flag in option structure
// of the aclDevCaps.
void
@@ -1139,3 +1141,7 @@ void dump(aclBinary *bin) {
bifbase *elfBin = reinterpret_cast<bifbase*>(bin->bin);
elfBin->dump();
}
const std::string &getLegacyLibName() {
return legacyLibName;
}
+2
Ver ficheiro
@@ -291,6 +291,8 @@ inline bool isHSAILTarget(const aclTargetInfo& target)
return (target.arch_id == aclHSAIL || target.arch_id == aclHSAIL64);
}
const std::string& getLegacyLibName();
enum scId {
SC_AMDIL = 0,
SC_HSAIL = 0,