P4 to Git Change 1129742 by yaxunl@yaxunl_stg_win50 on 2015/03/11 15:37:02
EPR #415603 - [CQE OCL][QR][CPU] 29 of 34 SPIR tests failed in all CPUs due to CL#1127589. Two changes: 1. OCL builtin needs to be demangled. 2. setupLoaderObject() needs to be moved into dll and called through comp lib interface since it needs to reset function pointers of several comp lib interface. Otherwise it will use function pointers of the static comp lib and causes strange errors. Affected files ... ... //depot/stg/opencl/drivers/opencl/compiler/lib/api/v0_8/acl.cpp#26 edit ... //depot/stg/opencl/drivers/opencl/compiler/lib/api/v0_8/aclLoaders.cpp#11 edit ... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/v0_8/if_acl.cpp#62 edit ... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/v0_8/if_acl.h#2 edit ... //depot/stg/opencl/drivers/opencl/compiler/lib/include/v0_8/aclFunctors.h#4 edit ... //depot/stg/opencl/drivers/opencl/compiler/lib/include/v0_8/aclStructs.h#15 edit ... //depot/stg/opencl/drivers/opencl/compiler/lib/include/v0_8/aclTypes.h#5 edit ... //depot/stg/opencl/drivers/opencl/compiler/llvm32/lib/Linker/AMDFixupKernelModule.cpp#3 edit ... //depot/stg/opencl/drivers/opencl/tests/ocltst/module/complib/CLAssumptionCheck.cpp#40 edit
Dieser Commit ist enthalten in:
@@ -2899,6 +2899,43 @@ void myLogFunc(const char * msg, size_t size)
|
||||
printf("%s\n", msg);
|
||||
}
|
||||
|
||||
#define CONDITIONAL_ASSIGN(A, B) A = (A) ? (A) : (B)
|
||||
acl_error ACL_API_ENTRY
|
||||
if_aclSetupLoaderObject(aclCompiler *cl) {
|
||||
/* setup the loader objects here now that we have parsed the
|
||||
* options and know the target. */
|
||||
CONDITIONAL_ASSIGN(cl->cgAPI.init, &CodegenInit);
|
||||
CONDITIONAL_ASSIGN(cl->cgAPI.fini, &CodegenFini);
|
||||
CONDITIONAL_ASSIGN(cl->cgAPI.codegen, &CodegenPhase);
|
||||
CONDITIONAL_ASSIGN(cl->linkAPI.init, &LinkInit);
|
||||
CONDITIONAL_ASSIGN(cl->linkAPI.fini, &LinkFini);
|
||||
CONDITIONAL_ASSIGN(cl->linkAPI.link, &OCLLinkPhase);
|
||||
CONDITIONAL_ASSIGN(cl->linkAPI.toLLVMIR, &OCLLinkToLLVMIR);
|
||||
CONDITIONAL_ASSIGN(cl->linkAPI.toSPIR, &OCLLinkToSPIR);
|
||||
|
||||
CONDITIONAL_ASSIGN(cl->feAPI.init, &OCLInit);
|
||||
CONDITIONAL_ASSIGN(cl->feAPI.fini, &OCLFini);
|
||||
#if !defined(LEGACY_COMPLIB)
|
||||
CONDITIONAL_ASSIGN(cl->feAPI.toIR, &OCLFEToSPIR);
|
||||
#else
|
||||
CONDITIONAL_ASSIGN(cl->feAPI.toIR, &OCLFEToLLVMIR);
|
||||
#endif
|
||||
|
||||
CONDITIONAL_ASSIGN(cl->feAPI.toModule, &OCLFEToModule);
|
||||
CONDITIONAL_ASSIGN(cl->feAPI.toISA, &OCLFEToISA);
|
||||
CONDITIONAL_ASSIGN(cl->optAPI.init, &OptInit);
|
||||
CONDITIONAL_ASSIGN(cl->optAPI.fini, &OptFini);
|
||||
CONDITIONAL_ASSIGN(cl->optAPI.optimize, &OptOptimize);
|
||||
CONDITIONAL_ASSIGN(cl->beAPI.init, &BEInit);
|
||||
CONDITIONAL_ASSIGN(cl->beAPI.fini, &BEFini);
|
||||
CONDITIONAL_ASSIGN(cl->beAPI.finalize, &BEAsmPhase);
|
||||
CONDITIONAL_ASSIGN(cl->beAPI.assemble, &BEAssemble);
|
||||
CONDITIONAL_ASSIGN(cl->beAPI.disassemble, &BEDisassemble);
|
||||
return ACL_SUCCESS;
|
||||
}
|
||||
|
||||
#undef CONDITIONAL_ASSIGN
|
||||
|
||||
extern "C" {
|
||||
bool aclRenderscriptCompile(
|
||||
char * srcFile,
|
||||
@@ -2972,4 +3009,5 @@ bool aclRenderscriptCompile(
|
||||
*outBuf = buffer;
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -126,4 +126,7 @@ if_aclDbgRemoveArgument(aclCompiler *cl,
|
||||
const char* kernel,
|
||||
const char* name) ACL_API_0_8;
|
||||
|
||||
acl_error ACL_API_ENTRY
|
||||
if_aclSetupLoaderObject(aclCompiler *cl) ACL_API_0_8;
|
||||
|
||||
#endif // _IF_ACL_0_8_H_
|
||||
|
||||
@@ -173,6 +173,9 @@ typedef acl_error
|
||||
const void *isa_code,
|
||||
size_t isa_size) ACL_API_0_8;
|
||||
|
||||
typedef acl_error
|
||||
(ACL_API_ENTRY *SetupLoaderObject_0_8)(aclCompiler *cl) ACL_API_0_8;
|
||||
|
||||
typedef void*
|
||||
(*AllocFunc_0_8)(size_t size) ACL_API_0_8;
|
||||
|
||||
|
||||
@@ -209,6 +209,7 @@ typedef struct _acl_cl_loader_rec_0_8 {
|
||||
QueryInfo getInfo;
|
||||
AddDbgArg addDbg;
|
||||
RemoveDbgArg removeDbg;
|
||||
SetupLoaderObject setupLoaderObject;
|
||||
} aclCLLoader_0_8;
|
||||
|
||||
//! Structure that holds the required functions
|
||||
|
||||
@@ -66,6 +66,7 @@ typedef Compile_0_8 Compile;
|
||||
typedef Link_0_8 Link;
|
||||
typedef AddDbgArg_0_8 AddDbgArg;
|
||||
typedef RemoveDbgArg_0_8 RemoveDbgArg;
|
||||
typedef SetupLoaderObject_0_8 SetupLoaderObject;
|
||||
typedef CompLog_0_8 CompLog;
|
||||
typedef RetrieveType_0_8 RetrieveType;
|
||||
typedef SetType_0_8 SetType;
|
||||
|
||||
In neuem Issue referenzieren
Einen Benutzer sperren