[AIMIGRAPHX-1203] Fix hash collision for MXRs and add salting script - #56
Draft
TedThemistokleous wants to merge 3 commits into
Draft
[AIMIGRAPHX-1203] Fix hash collision for MXRs and add salting script#56TedThemistokleous wants to merge 3 commits into
TedThemistokleous wants to merge 3 commits into
Conversation
…h_compile.py script for offline compile
apwojcik
approved these changes
Jul 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two main hash related items in this PR
Fix a hash collision that occurs when we try to load mxrs with quantization, exhaustive tune, mlss and other flags on/off.
Previous cases allow us to read in the incorrect MXR for the filename. The fix is to encode quantization levels and other EP hash values as part of the MXR name so different compilations that are saved produce different hash keys
Second item is adding a script called
migraphx_hash_compile.pywhich uses the EP to generate a precompiled mxr file that uses the hash and indexes each generated file by quantization. The script also adds ahashed-model_<md5sum>_manifest.logto the corresponding directory so that the compiled .mxr is referenced by the manifest of what compile options where used as well as pre build settings.This is required as the built in EP which is planned for EoL will not encode the other flags so as path forward future users would use the -v2 flag which will run the script with the entire quant changes mirroring the EP provider_options used in the compile.