Skip to content
Merged
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
11 changes: 10 additions & 1 deletion backends/arm/test/ops/test_slice.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

from typing import Tuple

import pytest
import torch
from executorch.backends.arm.quantizer.arm_quantizer import (
get_symmetric_a16w8_quantization_config,
Expand Down Expand Up @@ -43,7 +44,6 @@


class Slice(torch.nn.Module):

def forward(self, x: torch.Tensor, s: list[tuple[int, int]]):
slices = [slice(*i) for i in s]
return x[slices]
Expand Down Expand Up @@ -153,6 +153,9 @@ def get_symmetric_a16w8_slice_quantizer(per_channel_quantization=False):


@common.parametrize("test_data", test_data_suite)
@pytest.mark.xfail(
reason="missing int16 slice ops support; fails at TOSA reference model with Unsupported operation type or rank. See: https://github.com/pytorch/executorch/issues/13976"
)
def test_slice_tensor_16a8w_tosa_INT(test_data: torch.Tensor):
"""Test slice operation with 16A8W quantization (16-bit activations, 8-bit weights)"""
per_channel_quantization = False
Expand All @@ -178,6 +181,9 @@ def test_slice_tensor_16a8w_tosa_INT(test_data: torch.Tensor):

@common.parametrize("test_data", test_data_suite)
@common.XfailIfNoCorstone300
@pytest.mark.xfail(
reason="Vela compilation fails with 'Invalid arguments' for int16 slice operations"
)
def test_slice_tensor_16a8w_u55_INT16(test_data: torch.Tensor):
"""Test slice operation with 16A8W quantization on U55 (16-bit activations, 8-bit weights)"""
per_channel_quantization = False
Expand All @@ -202,6 +208,9 @@ def test_slice_tensor_16a8w_u55_INT16(test_data: torch.Tensor):

@common.parametrize("test_data", test_data_suite)
@common.XfailIfNoCorstone320
@pytest.mark.xfail(
reason="Vela compilation fails with 'Invalid arguments' for int16 slice operations"
)
def test_slice_tensor_16a8w_u85_INT16(test_data: torch.Tensor):
"""Test slice operation with 16A8W quantization on U85 (16-bit activations, 8-bit weights)"""
per_channel_quantization = False
Expand Down
Loading