[Attention] Added caching for flashinfer binaries during JIT#17730
Merged
MasterJH5574 merged 5 commits intoapache:mainfrom Mar 13, 2025
Merged
[Attention] Added caching for flashinfer binaries during JIT#17730MasterJH5574 merged 5 commits intoapache:mainfrom
MasterJH5574 merged 5 commits intoapache:mainfrom
Conversation
Contributor
MasterJH5574
left a comment
There was a problem hiding this comment.
Thank you so much @annanyapr! I left a few comments
Comment on lines
+68
to
+73
| if hash_file.exists(): | ||
| with open(hash_file, "r") as f: | ||
| cached_hash = f.read().strip() | ||
| if cached_hash == system_lib_hash_value: | ||
| # Cache hit: return all object files in build_directory | ||
| return list(build_directory.glob("*.o")) |
Contributor
There was a problem hiding this comment.
For cache hit, we also need to make sure all .o files exist and are not modified. If any of the .o files is missing or is modified since the latest_object_mtime, we also need to recompile. So let's add this into the hash key as well.
Contributor
Author
There was a problem hiding this comment.
I think its good to check for existance of the object file, but wouldn't the second condition will be never true(because of the definition of the latest_object_mtime). I think we should be pretty safe after the deletion check.
Contributor
Author
|
@MasterJH5574 I have addressed the PR reviews. |
MasterJH5574
approved these changes
Mar 13, 2025
Contributor
MasterJH5574
left a comment
There was a problem hiding this comment.
LGTM. Thank you @annanyapr!
ShiboXing
pushed a commit
to ShiboXing/tvm
that referenced
this pull request
Aug 10, 2025
…17730) In this PR I have added support for caching the flashinfer binaries during the JIT flow in TVM.
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.
In this PR I have added support for caching the flash infer binaries during the JIT flow in TVM.