Describes a single kernel replacement: what to replace and with what.
| 61 | |
| 62 | @dataclass |
| 63 | class KernelReplacement: |
| 64 | """Describes a single kernel replacement: what to replace and with what.""" |
| 65 | kernel_type: str # e.g. "matmul", "layernorm", "rmsnorm" |
| 66 | rank: int # priority rank from profiling |
| 67 | speedup: float # individual kernel speedup |
| 68 | optimized_path: str # path to optimized kernel .py file |
| 69 | module_fn: Optional[Callable] = None # loaded kernel function |
| 70 | |
| 71 | |
| 72 | @dataclass |
no outgoing calls
no test coverage detected