From ff4782620ee290c7d2369811df72586c450d9afa Mon Sep 17 00:00:00 2001 From: German Andryeyev <56892148+gandryey@users.noreply.github.com> Date: Fri, 14 Nov 2025 12:28:03 -0500 Subject: [PATCH] SWDEV-547108 - Fix PAL build with HSA backend (#1850) When hip is built with HSA backend then the headers from ROCR will be used, but scratch_backing_memory_byte_size is a part of amd_queue_v2_t structure --- projects/clr/rocclr/device/pal/palvirtual.hpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/projects/clr/rocclr/device/pal/palvirtual.hpp b/projects/clr/rocclr/device/pal/palvirtual.hpp index 2901d2a314..4e83bffc47 100644 --- a/projects/clr/rocclr/device/pal/palvirtual.hpp +++ b/projects/clr/rocclr/device/pal/palvirtual.hpp @@ -60,7 +60,11 @@ struct AqlPacketMgmt : public amd::EmbeddedObject { static constexpr uint32_t kAqlPacketsListSize = 4 * Ki; AqlPacketMgmt(const Device& dev); +#if defined(WITH_HSA_DEVICE) + amd_queue_v2_t amd_queue_{}; +#else amd_queue_t amd_queue_{}; +#endif alignas(sizeof(hsa_kernel_dispatch_packet_t)) hsa_kernel_dispatch_packet_t aql_packets_[kAqlPacketsListSize]; //!< The list of AQL packets GpuEvent aql_events_[kAqlPacketsListSize]; //!< The list of gpu for each AQL packet