Skip to content

Commit 5c5126e

Browse files
dimvarcopybara-github
authored andcommitted
PR #22107: Change cuda_configure.bzl to handle blackwell ptx variants with accelerated features.
Imported from GitHub PR openxla/xla#22107 Copybara import of the project: -- a718233bcf95d047a11b1d18366133f08d3b1eee by Dimitris Vardoulakis <[email protected]>: Change cuda_configure.bzl to handle blackwell ptx variants with accelerated features. Merging this change closes #22107 PiperOrigin-RevId: 721867604
1 parent 2e92560 commit 5c5126e

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

third_party/gpus/cuda/hermetic/cuda_configure.bzl

+6-3
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,12 @@ def _compute_capabilities(repository_ctx):
171171
for prefix in ["compute_", "sm_"]:
172172
if not capability.startswith(prefix):
173173
continue
174-
if len(capability) == len(prefix) + 2 and capability[-2:].isdigit():
175-
continue
176-
if len(capability) == len(prefix) + 3 and capability.endswith("90a"):
174+
version = capability[len(prefix):]
175+
176+
# Allow PTX accelerated features: sm_90a, sm_100a, etc.
177+
if version.endswith("a"):
178+
version = version[:-1]
179+
if version.isdigit() and len(version) in (2, 3):
177180
continue
178181
_auto_configure_fail("Invalid compute capability: %s" % capability)
179182

0 commit comments

Comments
 (0)