[llvm] [bazel] export Runtimes.h from GpuToROCDLTransforms (PR #172607)

Emilio Cota via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 16 23:35:21 PST 2025


https://github.com/cota created https://github.com/llvm/llvm-project/pull/172607

Otherwise users of mlir::populateGpuToROCDLConversionPatterns cannot call it, because they can't access the definition of the mlir::gpu::amd::Runtime enum, which is in Runtimes.h.

>From 02c6999707b36ea9b69c53d7189d2e3e6f84c402 Mon Sep 17 00:00:00 2001
From: Emilio Cota <ecg at google.com>
Date: Wed, 17 Dec 2025 02:32:09 -0500
Subject: [PATCH] [bazel] export Runtimes.h from GpuToROCDLTransforms

Otherwise users of mlir::populateGpuToROCDLConversionPatterns
cannot call it, because they can't access the definition of
the mlir::gpu::amd::Runtime enum, which is in Runtimes.h.
---
 utils/bazel/llvm-project-overlay/mlir/BUILD.bazel | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/utils/bazel/llvm-project-overlay/mlir/BUILD.bazel b/utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
index cd9c8e96ab2ba..93bc9ad433d6a 100644
--- a/utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
@@ -6055,10 +6055,12 @@ gentbl_cc_library(
 cc_library(
     name = "GPUToROCDLTransforms",
     srcs = [
-        "include/mlir/Conversion/GPUToROCDL/Runtimes.h",
         "lib/Conversion/GPUToROCDL/LowerGpuOpsToROCDLOps.cpp",
     ],
-    hdrs = ["include/mlir/Conversion/GPUToROCDL/GPUToROCDLPass.h"],
+    hdrs = [
+        "include/mlir/Conversion/GPUToROCDL/GPUToROCDLPass.h",
+        "include/mlir/Conversion/GPUToROCDL/Runtimes.h",
+    ],
     includes = ["include"],
     deps = [
         ":AMDGPUDialect",



More information about the llvm-commits mailing list