[Mlir-commits] [mlir] [mlir][gpu] Propagate errors from `ModuleToObject` callbacks (PR #170134)

Mehdi Amini llvmlistbot at llvm.org
Wed Dec 3 09:17:38 PST 2025


joker-eph wrote:

> If we want to override llvm IR during linking/optimizations phases and/or override device assembly, we will have to do it in those callbacks and we will have callbacks to return errors.

I don't believe this is needed: proof of existence if what you're doing in the other PR to catch the error.

I'll reiterate that the callback design is creating a monolithic component, which is not modular. We went with this only because the callbacks were intended as "debugging" things that don't affect the behavior of ModuleToObject significantly. 

If we need to provide more flexibility to users, the more modular way to achieve it is by disaggregating the component into pieces that the user can assemble, instead of making the "monolith" more complex with complex config/callbacks mechanism. Hence my objection to the current direction here.

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


More information about the Mlir-commits mailing list