Skip to content

Commit

Permalink
[sharktank] Mark tests as expected to fail (#686)
Browse files Browse the repository at this point in the history
Marks tests that fail with `torch==2.{4.0,4.1,5.0,5.1}+cpu` as expected
to fail:

* `test_sharded_conv2d_with_iree`
* `test_sharded_resnet_block_with_iree`
* `testExportNondecomposed`
* `testExportWithArgumentDeviceAffinities`
  • Loading branch information
marbre authored Dec 13, 2024
1 parent ec1424e commit bcecd43
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 0 deletions.
6 changes: 6 additions & 0 deletions sharktank/tests/export_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

import pytest

from sharktank.types import (
ReplicatedTensor,
SplitPrimitiveTensor,
Expand Down Expand Up @@ -70,6 +72,10 @@ def testGetFlatArgumentDeviceAffinities(self):
}
assert_dicts_equal(affinities, expected_affinities)

@pytest.mark.xfail(
torch.__version__ >= (2, 4),
reason="https://github.com/nod-ai/shark-ai/issues/685",
)
def testExportWithArgumentDeviceAffinities(self):
args = (ReplicatedTensor(ts=[torch.tensor([1])]), torch.tensor([[2]]))

Expand Down
6 changes: 6 additions & 0 deletions sharktank/tests/layers/paged_llama_attention_block_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

import pytest

import logging

logging.basicConfig(level=logging.DEBUG)
Expand Down Expand Up @@ -118,6 +120,10 @@ def forward(self, h, seq_block_ids, cache_state):
asm = str(output.mlir_module)
self.assertNotIn("scaled_dot_product_attention", asm)

@pytest.mark.xfail(
torch.__version__ >= (2, 4),
reason="https://github.com/nod-ai/shark-ai/issues/684",
)
def testExportNondecomposed(self):
dtype = torch.float32

Expand Down
5 changes: 5 additions & 0 deletions sharktank/tests/layers/sharded_conv2d_with_iree_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

import pytest

from pathlib import Path
import tempfile
import torch
Expand Down Expand Up @@ -181,6 +183,9 @@ def run_test_sharded_conv2d_with_iree(
)


@pytest.mark.xfail(
torch.__version__ >= (2, 5), reason="https://github.com/nod-ai/shark-ai/issues/682"
)
def test_sharded_conv2d_with_iree(
mlir_path: Optional[Path],
module_path: Optional[Path],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,9 @@ def run_test_sharded_resnet_block_with_iree(
strict=True,
raises=AssertionError,
)
@pytest.mark.xfail(
torch.__version__ >= (2, 5), reason="https://github.com/nod-ai/shark-ai/issues/683"
)
def test_sharded_resnet_block_with_iree(
mlir_path: Optional[Path],
module_path: Optional[Path],
Expand Down

0 comments on commit bcecd43

Please sign in to comment.