[code-reflection] RFR: Minor logging changes for HAT ModuleOp support

duke duke at openjdk.org
Tue Aug 12 17:06:11 UTC 2025


On Tue, 12 Aug 2025 16:57:25 GMT, Ruby Chen <duke at openjdk.org> wrote:

> Add more descriptive logs for ModuleOp backend in HAT.
> 
> To use the ModuleOp backend, pass `moduleOp` as an arg to the `hat/run.java` script when running a HAT example. For example, running the `mandel` example with the `ffi-opencl` backend and `moduleOp` enabled can be done with 
> 
> java @hat/run moduleOp ffi-opencl squares
> 
> Adding `moduleOp` sets `-DmoduleOp=true` and passes it to the backend, which uses the flag to choose between the original `CallGraph` implementation and the new `moduleOp` implementation.
> 
> `ModuleOpWrapper` now contains `createTransitiveInvokeModule()`, which creates a `ModuleOp` representing a call graph when given an entrypoint. This method is called in `KernelCallGraph` and `ComputeCallGraph` to generate their respective call graphs. The kernel and compute call graph classes also maintain a map of buffer accesses, along with structures storing other useful methods.
> 
> The `C99FFIBackend`, `CudaBackend`, `MockBackend`, and `C99HATKernelBuilder` access call graphs structures differently depending on the `moduleOp` flag.

@rbrchen 
Your change (at version 07b1939532d4077c17d5a87fa3ea01e1bf3cb6fb) is now ready to be sponsored by a Committer.

-------------

PR Comment: https://git.openjdk.org/babylon/pull/521#issuecomment-3180233871


More information about the babylon-dev mailing list