[llvm] [Offload] Return an integer user count for AMDGPU HSA queues (PR #223335)

via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 23 23:54:33 PDT 2026


================
@@ -0,0 +1,34 @@
+//===- AMDGPUQueueUserCount.h - HSA queue stream user count -----*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef OFFLOAD_PLUGINS_NEXTGEN_AMDGPU_UTILS_AMDGPUQUEUEUSERCOUNT_H
+#define OFFLOAD_PLUGINS_NEXTGEN_AMDGPU_UTILS_AMDGPUQUEUEUSERCOUNT_H
+
+#include <cstdint>
+
+namespace llvm {
+namespace omp {
+namespace target {
+namespace plugin {
+
+/// Tracks how many streams currently use an HSA queue.
+struct AMDGPUQueueUserCount {
----------------
StevenYangCC wrote:

Agreed. The separate header is removed. NumUsers stays on AMDGPUQueueTy, and getUserCount returns that integer directly.

https://github.com/llvm/llvm-project/pull/223335


More information about the llvm-commits mailing list