Skip to content

clean #90 backport - #91

Open
mofeing wants to merge 2 commits into
mainfrom
ss/clean-backport
Open

clean #90 backport#91
mofeing wants to merge 2 commits into
mainfrom
ss/clean-backport

Conversation

@mofeing

@mofeing mofeing commented Aug 13, 2026

Copy link
Copy Markdown
Member

i wasn't aware of #90 but there are things that shouldn't have been merged. there are a couple of differences with the Reactant copy of MLIR.jl:

  1. mlirOperationInject (used by tryinject!) is implemented only in libReactantExtra, so any other build of libMLIR will error because it won't find the symbol. also, it was more an useful experiment at the time, that seen in perspective now, it wasn't maybe a great idea and we should probably remove it.
  2. Random and StableRNGs are just used for adding a lil hash we suffix to the filenames of the MLIR dumps. in the context of Reactant, it may make sense because we already use those libs for other stuff, but it's an overkill here. also, i personally find that hash really annoying when dumping MLIR to files because filenames are already suffixed with a counter and can't understand why we need that random suffix.

cc @simeonschaub

Comment thread src/IR/Pass.jl
Comment on lines +119 to 120
fname = mod_name === nothing ? "" : String(mod_name)
fname = "module_" * lpad(MLIR_DUMP_COUNTER[], 3, "0") * "_$(fname)"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe something like this to prevent a trailing _ ?

Suggested change
fname = mod_name === nothing ? "" : String(mod_name)
fname = "module_" * lpad(MLIR_DUMP_COUNTER[], 3, "0") * "_$(fname)"
fname = mod_name === nothing ? "" : "_" * String(mod_name)
fname = "module_" * lpad(MLIR_DUMP_COUNTER[], 3, "0") * fname

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.

3 participants