Skip to content

Commit

Permalink
[TESTS] Disable lerp test for torch.export on older versions (openvin…
Browse files Browse the repository at this point in the history
…otoolkit#27302)

### Details:
- *Disable `lerp_` test for `torch.export` on older versions of `torch`*

### Tickets:
 - *CVS-156278*

Signed-off-by: Maxim Vafin <maxim.vafin@intel.com>
  • Loading branch information
mvafin authored and CuriousPanCake committed Nov 6, 2024
1 parent 687cfc6 commit 8689786
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/layer_tests/pytorch_tests/test_lerp.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import numpy as np
import pytest
import torch
from packaging import version

from pytorch_layer_test_class import PytorchLayerTest, skip_if_export

Expand Down Expand Up @@ -44,6 +45,9 @@ def forward2(self, lhs, rhs):
@pytest.mark.precommit_fx_backend
def test_lerp(self, ie_device, precision, ir_version,
weight, input_shape_rhs, op_type):
if (op_type == "lerp_" and PytorchLayerTest.use_torch_export() and
version.parse(torch.__version__) < version.parse("2.5")):
pytest.skip("Not supported in PyTorch versions earlier than 2.5.")
self.input_rhs = np.random.randn(*input_shape_rhs).astype(np.float32)
if isinstance(weight, list):
weight = torch.rand(weight)
Expand Down

0 comments on commit 8689786

Please sign in to comment.