Skip to content

Commit c2c7b9b

Browse files
authored
Handle new cuda versions (#7384)
Small update to automatically handle when a newer version of cuda is being used. # New contributor declaration - [x] I am not making a trivial change, such as fixing a typo in a comment. - [x] I have written a PR description following these [rules](https://cbea.ms/git-commit/#why-not-how). - [x] I have run `pre-commit run --from-ref origin/main --to-ref HEAD`. - Select one of the following. - [ ] I have added tests. - `/test` for `lit` tests - `/unittest` for C++ tests - `/python/test` for end-to-end tests - [x] This PR does not need a test because `modifying install logic`. - Select one of the following. - [x] I have not added any `lit` tests. - [ ] The `lit` tests I have added follow these [best practices](https://mlir.llvm.org/getting_started/TestingGuide/#filecheck-best-practices), including the "tests should be minimal" section. (Usually running Python code and using the instructions it generates is not minimal.)
1 parent 4c379ab commit c2c7b9b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

third_party/nvidia/backend/compiler.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,11 @@ def ptx_get_version(cuda_version) -> int:
5959
return 70 + minor
6060
if major == 10:
6161
return 63 + minor
62+
63+
if major >= 13:
64+
base_ptx = 90
65+
return base_ptx + (major - 13) * 10 + minor
66+
6267
raise RuntimeError("Triton only support CUDA 10.0 or higher, but got CUDA version: " + cuda_version)
6368

6469

0 commit comments

Comments
 (0)