[Refactor] Simplify B12X linear kernels and warmup (#52368)
Signed-off-by: mgoin <mgoin64@gmail.com>
This commit is contained in:
+9
-2
@@ -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."""
|
||||
|
||||
Reference in New Issue
Block a user