[Mlir-commits] [mlir] [mlir][gpu] GPUToROCDL: Add C++ argument to populate allowedDialects (PR #157402)
Pablo Antonio Martinez
llvmlistbot at llvm.org
Mon Sep 8 07:45:34 PDT 2025
================
@@ -50,7 +52,9 @@ createLowerGpuOpsToROCDLOpsPass(
const std::string &chipset = "gfx900",
unsigned indexBitwidth = kDeriveIndexBitwidthFromDataLayout,
bool useBarePtrCallConv = false,
- gpu::amd::Runtime runtime = gpu::amd::Runtime::Unknown);
+ gpu::amd::Runtime runtime = gpu::amd::Runtime::Unknown,
+ const std::optional<llvm::SmallDenseSet<llvm::StringRef>> &allowedDialects =
+ std::nullopt);
----------------
pabloantoniom wrote:
> TableGen already generates all the suitable creation function, we should be able to remove this entirely and use the generated one instead (what is missing?)
I'm not sure I understand your suggestion, sorry. If you try to call `createLowerGpuOpsToROCDLOpsPass` (i.e., from the pass manager) in C++, prior to this PR, there was no way to specify `allowedDialects`, so this PR adds support for that (Unless I'm missing some TableGen functionality that I did not know about)
https://github.com/llvm/llvm-project/pull/157402
More information about the Mlir-commits
mailing list