[Refactor] Simplify B12X linear kernels and warmup (#52368)

Signed-off-by: mgoin <mgoin64@gmail.com>
This commit is contained in:
Misha Goin
2026-08-17 09:45:45 -07:00
committed by GitHub
parent 017e9f4448
commit 4ab5e5012a
15 changed files with 969 additions and 1617 deletions
+9 -2
View File
@@ -5,14 +5,21 @@
import functools
import importlib
import importlib.util
from collections.abc import Iterable
from dataclasses import fields, is_dataclass
from collections.abc import Callable, Hashable, Iterable
from dataclasses import dataclass, fields, is_dataclass
from types import ModuleType
from typing import Any
import torch
@dataclass(frozen=True)
class B12xWarmupUnit:
name: str
key: Hashable
compile: Callable[[], None]
@functools.cache
def has_b12x() -> bool:
"""Return whether the B12X package is installed."""