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

Joseph Huber via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 23 21:00:32 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 {
----------------
jhuber6 wrote:

I am genuinely confused why we would need an entirely separate header and helper utility to wrap around this. A lot of your other PRs are like this, so I can only assume you are relying on LLM generated code that's hyper tuned for this style of programming.

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


More information about the llvm-commits mailing list