From 302c6e0f6f67ca334dd594dc6814253f08ad6a12 Mon Sep 17 00:00:00 2001 From: foreman Date: Tue, 7 Oct 2014 07:04:03 -0400 Subject: [PATCH] P4 to Git Change 1084822 by emankov@em-hsa-amd on 2014/10/07 06:53:10 ECR #333753 - new tests are added to ocltst -m oclcomplib -t OCLRTGetInfo tests on aclQueryInfo for: RT_KERNEL_NAMES, RT_CONTAINS_LLVMIR, RT_CONTAINS_OPTIONS, RT_CONTAINS_BRIG, RT_CONTAINS_HSAIL, RT_CONTAINS_ISA + query for RT_CONTAINS_HSAIL is fixed in Compiler Lib: looking for symbol symHSAILText instead of section aclCODEGEN, because aclCODEGEN section may contain also symOpenclMeta, symOpenclKernel, symOpenclStub besides symHSAILText. Testing: pre check-in, ocltst -m oclcomplib Reviewer: Brian Sumner Affected files ... ... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/v0_8/if_acl.cpp#53 edit ... //depot/stg/opencl/drivers/opencl/tests/ocltst/module/complib/oclrtGetInfo.cpp#16 edit [ROCm/clr commit: 99fdc9adbba41b206a4c6411d0fef422d60105bc] --- .../clr/rocclr/compiler/lib/backends/common/v0_8/if_acl.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/projects/clr/rocclr/compiler/lib/backends/common/v0_8/if_acl.cpp b/projects/clr/rocclr/compiler/lib/backends/common/v0_8/if_acl.cpp index 1b6935420e..bcf0739a5c 100644 --- a/projects/clr/rocclr/compiler/lib/backends/common/v0_8/if_acl.cpp +++ b/projects/clr/rocclr/compiler/lib/backends/common/v0_8/if_acl.cpp @@ -2296,7 +2296,10 @@ if_aclQueryInfo(aclCompiler *cl, *size = sizeof(bool); return ACL_SUCCESS; } else if (*size >= sizeof(bool)) { - bool contains = elfBin->isSection(aclCODEGEN); + const oclBIFSymbolStruct* sym = findBIF30SymStruct(symHSAILText); + assert(sym && "symbol not found"); + std::string symbolName = sym->str[PRE] + std::string("main") + sym->str[POST]; + bool contains = elfBin->isSymbol(aclCODEGEN, symbolName.c_str()); memcpy(ptr, &contains, sizeof(bool)); return ACL_SUCCESS; }