Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions mojo_opset/backends/ttx/kernels/npu/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
from .swa import swa_paged_prefill_impl
from .swiglu import swiglu_bwd_impl
from .swiglu import swiglu_fwd_impl
from .int8_gemm import int8_gemm_dequant_impl, prepare_b_impl

# triton-dist based comm kernels (requires triton_dist + shmem packages)
allgather_gemm_impl = None
Expand Down Expand Up @@ -131,4 +132,6 @@
"allgather_gemm_impl",
"gemm_allreduce_impl",
"gemm_reduce_scatter_impl",
"int8_gemm_dequant_impl",
"prepare_b_impl",
]
2 changes: 1 addition & 1 deletion mojo_opset/backends/ttx/kernels/npu/int8_gemm.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def _pad_to(x, mult):
return ((x + mult - 1) // mult) * mult


def prepare_b(b: torch.Tensor) -> torch.Tensor:
def prepare_b_impl(b: torch.Tensor) -> torch.Tensor:
Comment thread
zhangjihang-BD marked this conversation as resolved.
"""Transpose B to (N, K) row-major and pad to block boundaries.

For inference: weight B is fixed, call once and reuse.
Expand Down
Loading