Skip to content

[compile] Add dump_mlir_dir option to compile_tile - #104

Open
ravil-mobile wants to merge 1 commit into
NVIDIA:mainfrom
ravil-mobile:ravil/dump-option
Open

[compile] Add dump_mlir_dir option to compile_tile#104
ravil-mobile wants to merge 1 commit into
NVIDIA:mainfrom
ravil-mobile:ravil/dump-option

Conversation

@ravil-mobile

Copy link
Copy Markdown

Allow callers to specify a MLIR dump directory directly, overriding CUDA_TILE_DUMP_TILEIR.

Description

This turns MLIR dumping from a global, process-level debug switch into a per-call, programmatic option. That matters most for callers that compile many variants of the same kernel in one process and want fine-grained control over which one(s) get dumped and where - the clearest example is autotuning:

  • An autotuner (experimental/tile_experimental, or compilation/_export.py's multi-signature export path) may call compile_tile repeatedly for different tile-size/config candidates of the same kernel.
  • With only the env var, you couldn't isolate the MLIR for one specific candidate config, or route different configs to different directories, without restarting the process with a different env var each time.
  • With dump_mlir_dir, calling code can decide at runtime - e.g. "dump the MLIR for the config that autotuning picked as the winner" or "dump each candidate into its own subdirectory keyed by config" - by just passing the argument on that specific compile_tile() invocation, no environment mutation needed.

Checklist

  • [ x] I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@ravil-mobile
ravil-mobile force-pushed the ravil/dump-option branch 2 times, most recently from 2033779 to 7ae3149 Compare September 3, 2026 19:05
Allow callers to specify a MLIR dump directory directly, overriding CUDA_TILE_DUMP_TILEIR.

Signed-off-by: Ravil Dorozhinskii <rdorozhinski@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant