Embed DeepGEMM source (not submodule) for SM100 raw CUDA GEMM primitives

This commit is contained in:
2026-06-01 07:39:40 +00:00
parent dae83723a3
commit e3ea609ddd
145 changed files with 27360 additions and 1 deletions

View File

@@ -0,0 +1,38 @@
import functools
import os
import torch
from typing import Callable
def get_arch_major() -> int:
major, minor = torch.cuda.get_device_capability()
return major
def test_filter(condition: Callable):
def decorator(func):
@functools.wraps(func)
def wrapper(*args, **kwargs):
if condition():
func(*args, **kwargs)
else:
print(f'{func.__name__}:')
print(f' > Filtered by {condition}')
print()
return wrapper
return decorator
def ignore_env(name: str, condition: Callable):
def decorator(func):
@functools.wraps(func)
def wrapper(*args, **kwargs):
if condition():
saved = os.environ.pop(name, None)
func(*args, **kwargs)
if saved is not None:
os.environ[name] = saved
else:
func(*args, **kwargs)
return wrapper
return decorator