Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search for ptxas only for cuda backend in supports_tma function #5314

Merged
merged 1 commit into from
Dec 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion python/triton/_internal_testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,13 @@ def to_numpy(x):


def supports_tma(byval_only=False):
if not is_cuda():
return False
_, cuda_version = _path_to_binary("ptxas")
min_cuda_version = (12, 0) if byval_only else (12, 3)
cuda_version_tuple = tuple(map(int, cuda_version.split(".")))
assert len(cuda_version_tuple) == 2, cuda_version_tuple
return is_cuda() and torch.cuda.get_device_capability()[0] >= 9 and cuda_version_tuple >= min_cuda_version
return torch.cuda.get_device_capability()[0] >= 9 and cuda_version_tuple >= min_cuda_version


def tma_skip_msg(byval_only=False):
Expand Down
Loading