[Mlir-commits] [mlir] [MLIR] Add callback functions for ModuleToObject (PR #116007)

Fabian Mora llvmlistbot at llvm.org
Wed Nov 13 07:39:01 PST 2024


fabianmcg wrote:

I don't think `gpu-module-to-binary` is worth modifying for testing these. The reason I brought it up is because I was mainly concerned to why this was good for upstream and `gpu-module-to-binary` is its primary indirect user. I was unaware of any uses downstream (outside GPU compilation).

> Note that downstream, we have uses of `ModuelToObject` and other components totally independently of `gpu-module-to-binary` or the pass infra.

Are these uses through the target attributes (NVVM, ROCDL)? If not, downstream can always subclass `ModuleToObject`.  That's why most of its methods are virtual, in case anyone needed to customize it. See for example https://github.com/ROCm/rocMLIR/blob/develop/mlir/lib/Target/Target.cpp#L72-L91

Also, FWIW the main reason for my block is the lack of unit tests.

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


More information about the Mlir-commits mailing list