From bbe6246f197bb229cecca34323d871ae4e7cbc3e Mon Sep 17 00:00:00 2001 From: Vladislav Sytchenko Date: Tue, 11 May 2021 11:46:56 -0400 Subject: [PATCH] SWDEV-273235 - Windows PAL/LC fixes HIP should be built with HSAIL support disabled. Currently HSAILProgram::info() and VirtualGPU::buildKernelInfo() expose ACL interfaces directly. This should not be allowed. Change-Id: Iae15d4f19be16806826f2f6cb600752c11f97fc1 --- rocclr/device/pal/palprogram.cpp | 4 ++-- rocclr/device/pal/palvirtual.cpp | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/rocclr/device/pal/palprogram.cpp b/rocclr/device/pal/palprogram.cpp index 0e720e2ccc..76bffa9b3a 100644 --- a/rocclr/device/pal/palprogram.cpp +++ b/rocclr/device/pal/palprogram.cpp @@ -360,17 +360,17 @@ bool HSAILProgram::allocKernelTable() { void HSAILProgram::fillResListWithKernels(VirtualGPU& gpu) const { gpu.addVmMemory(&codeSegGpu()); } -const aclTargetInfo& HSAILProgram::info() { #if defined(WITH_COMPILER_LIB) +const aclTargetInfo& HSAILProgram::info() { acl_error err; info_ = amd::Hsail::GetTargetInfo(palNullDevice().settings().use64BitPtr_ ? "hsail64" : "hsail", device().isa().hsailName(), &err); if (err != ACL_SUCCESS) { LogWarning("aclGetTargetInfo failed"); } -#endif // defined(WITH_COMPILER_LIB) return info_; } +#endif bool HSAILProgram::saveBinaryAndSetType(type_t type) { #if defined(WITH_COMPILER_LIB) diff --git a/rocclr/device/pal/palvirtual.cpp b/rocclr/device/pal/palvirtual.cpp index 7260e0d244..4ddd805f82 100644 --- a/rocclr/device/pal/palvirtual.cpp +++ b/rocclr/device/pal/palvirtual.cpp @@ -3617,6 +3617,7 @@ void VirtualGPU::writeVQueueHeader(VirtualGPU& hostQ, const Memory* kernelTable) void VirtualGPU::buildKernelInfo(const HSAILKernel& hsaKernel, hsa_kernel_dispatch_packet_t* aqlPkt, HwDbgKernelInfo& kernelInfo, amd::Event* enqueueEvent) { +#if defined(WITH_COMPILER_LIB) amd::HwDebugManager* dbgManager = dev().hwDebugMgr(); assert(dbgManager && "No HW Debug Manager!"); @@ -3707,6 +3708,7 @@ void VirtualGPU::buildKernelInfo(const HSAILKernel& hsaKernel, hsa_kernel_dispat InvalidateSqCaches(); */ } +#endif } void VirtualGPU::assignDebugTrapHandler(const DebugToolInfo& dbgSetting,