chore: upgrade sgl-kernel 0.1.1 (#5933)

This commit is contained in:
Yineng Zhang
2025-04-30 16:13:30 -07:00
committed by GitHub
parent d353d08b4e
commit 9a6ad8916d
7 changed files with 20 additions and 14 deletions
+8 -5
View File
@@ -1905,13 +1905,16 @@ def fast_topk(values, topk, dim):
return torch.topk(values, topk, dim=dim)
def is_hopper_with_cuda_12_3():
def _check(cc_major):
if not is_cuda():
return False
is_hopper = torch.cuda.get_device_capability()[0] == 9
cuda_version = torch.version.cuda.split(".")
is_cuda_compatible = int(cuda_version[0]) == 12 and int(cuda_version[1]) >= 3
return is_hopper and is_cuda_compatible
return torch.cuda.get_device_capability()[0] == cc_major and tuple(
map(int, torch.version.cuda.split(".")[:2])
) >= (12, 3)
is_ampere_with_cuda_12_3 = lambda: _check(8)
is_hopper_with_cuda_12_3 = lambda: _check(9)
def get_free_port():