Conversation
martinloretzzz
left a comment
Member
There was a problem hiding this comment.
torch.version.cuda is your friend ;), otherwise looks good.
Member
Author
The question is how reliable is I will leave it like that, I think |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Fixes
Before: compilation of the sLSTM kernel failed on the CUDA version >= 13.0, because of the -static-global-template-stub flag, which defaults to
true. For the CUDA version 12.8 the exact same flag defaults tofalse(which is what we need)Fix: this flag was introduced only starting from the CUDA version 12.8 and simply inserting it would lead to an error (see example)
In order to fix the issue the
_find_cuda_home(from pytorchcpp_extensions) as well asget_cuda_versionwere introduced. The flag-static-global-template-stub=falseis inserted to theargs, only if CUDA version is >= 12.8 and CUDA path is found.Important: Major CUDA Toolkit version used for compilation should match with the CUDA version used by the PyTorch wheel. Mismatched versions (e.g., PyTorch cu128 with CUDA Toolkit 13.0) lead to build issues,
Before:
flashrnnattempts to installtritonunconditionally even for windows and macos.**Fix:**installs triton only for linux.
Before: constrint.py path failed on windows
Fix: Path.home() should fix home path for windows (still to be tested)
How to test:
main.py script for testing:
MacOS:
Linux: