Automated PR - 2026-07-07

This commit is contained in:
github-actions[bot]
2026-07-07 16:57:50 +00:00
parent 780984275f
commit 63fd9a4f86
157 changed files with 15976 additions and 5043 deletions
@@ -0,0 +1,21 @@
"""GPU architecture detection for blockwise kernel dispatch."""
import torch
def get_device_arch() -> str:
"""Return a coarse architecture name for the current CUDA device.
Used to pick the FP8 GEMM kernel variant (SM89 vs SM90) at runtime.
"""
if not torch.cuda.is_available():
raise RuntimeError("CUDA is not available; blockwise kernels require a CUDA device.")
major, minor = torch.cuda.get_device_capability(torch.cuda.current_device())
if major == 8 and (minor >= 0 and minor < 9):
return "ampere"
if major == 8 and minor == 9:
return "ada"
if major == 9 and minor == 0:
return "hopper"
if major in {10, 12}:
return "blackwell"
raise NotImplementedError(f"Unsupported GPU compute capability sm_{major}{minor}.")