MCPcopy Create free account
hub / github.com/RightNow-AI/autokernel / __init__

Method __init__

verify.py:411–416  ·  view source on GitHub ↗
(self, original: nn.Linear, kernel_fn: Callable)

Source from the content-addressed store, hash-verified

409 """Wraps nn.Linear to use an optimized matmul kernel_fn."""
410
411 def __init__(self, original: nn.Linear, kernel_fn: Callable):
412 super().__init__()
413 self.original = original
414 self.kernel_fn = kernel_fn
415 self.weight = original.weight
416 self.bias = original.bias
417
418 def forward(self, x: torch.Tensor) -> torch.Tensor:
419 # Reshape to 2D for kernel_fn, then reshape back

Callers 2

__init__Method · 0.45
__init__Method · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected