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
4 changes: 2 additions & 2 deletions kernels/src/kernels/layer/kernelize.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,12 +139,12 @@ def register_kernel_mapping(
"MultiHeadAttention": {
"cuda": {
Mode.TRAINING: LayerRepository(
repo_id="username/training-kernels",
repo_id="kernels-community/training-kernels",
layer_name="TrainingAttention",
version=1,
),
Mode.INFERENCE: LayerRepository(
repo_id="username/inference-kernels",
repo_id="kernels-community/inference-kernels",
layer_name="FastAttention",
version=1,
),
Expand Down
21 changes: 0 additions & 21 deletions kernels/tests/test_layer.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,6 @@ def local_kernel_path():
layer_name="SiluAndMul",
version=1,
),
"npu": LayerRepository(
repo_id="kernels-ext-npu/SwiGlu",
layer_name="SwiGlu",
),
},
"SiluAndMulNoCompile": {
"cuda": LayerRepository(
Expand Down Expand Up @@ -293,23 +289,6 @@ def test_hub_forward_xpu():
assert rms_norm_with_kernel.n_calls == 0


@pytest.mark.npu_only
def test_hub_forward_npu():
torch.manual_seed(0)

silu_and_mul = SiluAndMul()
X = torch.randn((32, 64), device="npu")
Y = silu_and_mul(X)

silu_and_mul_with_kernel = kernelize(SiluAndMulWithKernel(), device="npu", mode=Mode.INFERENCE)
Y_kernel = silu_and_mul_with_kernel(X)

torch.testing.assert_close(Y_kernel, Y)

assert silu_and_mul.n_calls == 1
assert silu_and_mul_with_kernel.n_calls == 0


def test_rocm_kernel_mapping(device):
"""Test that ROCm shorthand device mapping works correctly."""

Expand Down
Loading