Skip to content
Closed
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
2 changes: 1 addition & 1 deletion .github/dockerfiles/docker_tag
Original file line number Diff line number Diff line change
@@ -1 +1 @@
pr-28972
pr-29664
7 changes: 7 additions & 0 deletions .github/dockerfiles/ov_test/ubuntu_20_04_arm64/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@ RUN apt-get update && \
python3.11-venv \
python3.11-distutils \
libhdf5-dev \
# libGL for PyTorch Models tests
ffmpeg \
libsm6 \
libxext6 \
libgl1 \
libgl1-mesa-glx \
libglib2.0-0 \
&& \
rm -rf /var/lib/apt/lists/*

Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/linux_arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -239,9 +239,8 @@ jobs:

PyTorch_Models_Tests:
name: PyTorch Models tests
if: ${{ 'false' }} # TODO: Enable once the dependencies are ready for arm (no tensorflow-text available for arm from PyPI)
# if: fromJSON(needs.smart_ci.outputs.affected_components).PyTorch_FE.test
needs: [ Build, Docker, Smart_CI ]
if: fromJSON(needs.smart_ci.outputs.affected_components).PyTorch_FE.test
needs: [ Build, Docker, Smart_CI, Openvino_tokenizers ]
uses: ./.github/workflows/job_pytorch_models_tests.yml
with:
runner: 'aks-linux-16-cores-32gb-arm'
Expand Down
9 changes: 8 additions & 1 deletion tests/model_hub_tests/pytorch/test_aliked.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

import math
import os
import platform
import subprocess
import sys
import tempfile
Expand Down Expand Up @@ -120,9 +121,15 @@ def teardown_class(self):
# remove all downloaded files from cache
self.repo_dir.cleanup()

def get_supported_precommit_models():
models = []
if platform.machine() not in ['arm', 'armv7l', 'aarch64', 'arm64', 'ARM64']:
models.extend(['aliked-n16rot'])
return models

@pytest.mark.nightly
@pytest.mark.precommit
@pytest.mark.parametrize("name", ['aliked-n16rot'])
@pytest.mark.parametrize("name", get_supported_precommit_models())
def test_convert_model_all_models_default(self, name, ie_device):
self.run(name, None, ie_device)

Expand Down
3 changes: 3 additions & 0 deletions tests/model_hub_tests/pytorch/test_detectron2.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import os
import sys
import subprocess
import platform
import pytest
import torch
from models_hub_common.utils import get_models_list, compare_two_tensors
Expand Down Expand Up @@ -94,6 +95,8 @@ def teardown_class(self):
get_models_list(os.path.join(os.path.dirname(__file__), "detectron2_precommit")))
@pytest.mark.precommit
def test_detectron2_precommit(self, name, type, mark, reason, ie_device):
if platform.machine() in ['arm', 'armv7l', 'aarch64', 'arm64', 'ARM64']:
pytest.skip("Detectron2 models are not enabled on ARM")
self.run(name, None, ie_device)

@pytest.mark.parametrize("name",
Expand Down
3 changes: 3 additions & 0 deletions tests/model_hub_tests/pytorch/test_easyocr.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Copyright (C) 2018-2025 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

import platform
import pytest
import torch

Expand Down Expand Up @@ -29,4 +30,6 @@ def load_model(self, model_name, model_link):
@pytest.mark.nightly
@pytest.mark.parametrize("name", ["detector", "recognizer"])
def test_convert_model(self, name, ie_device):
if platform.machine() in ['arm', 'armv7l', 'aarch64', 'arm64', 'ARM64']:
pytest.skip("EasyOCR models are not enabled on ARM")
self.run(name, None, ie_device)
5 changes: 5 additions & 0 deletions tests/model_hub_tests/pytorch/test_hf_transformers.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# SPDX-License-Identifier: Apache-2.0

import os
import platform

from datasets import Audio, load_dataset
from huggingface_hub import hf_hub_download, model_info
Expand Down Expand Up @@ -525,13 +526,17 @@ def load_model_with_default_class(name, **kwargs):
])
@pytest.mark.precommit
def test_convert_model_precommit(self, name, type, ie_device):
if platform.machine() in ['arm', 'armv7l', 'aarch64', 'arm64', 'ARM64']:
pytest.skip("hf_transformers models are not enabled on ARM")
self.run(model_name=name, model_link=type, ie_device=ie_device)

@pytest.mark.parametrize("name,type", [("bert-base-uncased", "bert"),
("openai/clip-vit-large-patch14", "clip"),
])
@pytest.mark.precommit
def test_convert_model_precommit_export(self, name, type, ie_device):
if platform.machine() in ['arm', 'armv7l', 'aarch64', 'arm64', 'ARM64']:
pytest.skip("hf_transformers models are not enabled on ARM")
self.mode = "export"
self.run(model_name=name, model_link=type, ie_device=ie_device)

Expand Down
20 changes: 14 additions & 6 deletions tests/model_hub_tests/pytorch/test_llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import inspect

import numpy as np
import platform
import pytest
import torch
from transformers import AutoConfig, AutoTokenizer, AutoModelForCausalLM
Expand Down Expand Up @@ -237,12 +238,19 @@ def get_pkv(model, tokenizer):

return pkv, for_pkv["attention_mask"]

@pytest.mark.parametrize("type,name", [
("opt_gptq", "katuni4ka/opt-125m-gptq"),
("llama", "TinyLlama/TinyLlama-1.1B-Chat-v1.0"),
("gpt2", "openai-community/gpt2"),
("llama_awq", "casperhansen/tinyllama-1b-awq")
])
def get_supported_precommit_models():
models = [
("gpt2", "openai-community/gpt2"),
]
if platform.machine() not in ['arm', 'armv7l', 'aarch64', 'arm64', 'ARM64']:
models.extend([
("opt_gptq", "katuni4ka/opt-125m-gptq"),
("llama", "TinyLlama/TinyLlama-1.1B-Chat-v1.0"),
("llama_awq", "casperhansen/tinyllama-1b-awq"),
])
return models

@pytest.mark.parametrize("type,name", get_supported_precommit_models())
@pytest.mark.precommit
@pytest.mark.nightly
def test_convert_model_precommit(self, name, type, ie_device):
Expand Down
24 changes: 17 additions & 7 deletions tests/model_hub_tests/pytorch/test_timm.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# SPDX-License-Identifier: Apache-2.0

import os
import platform

import pytest
import timm
Expand Down Expand Up @@ -70,13 +71,22 @@ def infer_fw_model(self, model_obj, inputs):
fw_outputs = [fw_outputs.numpy(force=True)]
return fw_outputs

@pytest.mark.parametrize("name", ["mobilevitv2_050.cvnets_in1k",
"poolformerv2_s12.sail_in1k",
"vit_base_patch8_224.augreg_in21k",
"beit_base_patch16_224.in22k_ft_in22k",
"sequencer2d_l.in1k",
"gcresnext26ts.ch_in1k",
"volo_d2_224.sail_in1k"])
def get_supported_precommit_models():
models = [
"mobilevitv2_050.cvnets_in1k",
"poolformerv2_s12.sail_in1k",
"sequencer2d_l.in1k",
]
if platform.machine() not in ['arm', 'armv7l', 'aarch64', 'arm64', 'ARM64']:
models.extend([
"beit_base_patch16_224.in22k_ft_in22k",
"gcresnext26ts.ch_in1k",
"vit_base_patch8_224.augreg_in21k",
"volo_d2_224.sail_in1k",
])
return models

@pytest.mark.parametrize("name", get_supported_precommit_models())
@pytest.mark.precommit
def test_convert_model_precommit(self, name, ie_device):
self.mode = "trace"
Expand Down
19 changes: 14 additions & 5 deletions tests/model_hub_tests/pytorch/test_torchvision_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# SPDX-License-Identifier: Apache-2.0

import os
import platform
import tempfile

import pytest
Expand Down Expand Up @@ -98,11 +99,19 @@ def infer_fw_model(self, model_obj, inputs):
fw_outputs = [fw_outputs.numpy(force=True)]
return fw_outputs

@pytest.mark.parametrize("model_name", ["efficientnet_b7",
"raft_small",
"swin_v2_s",
"quantized_mobilenet_v3_large",
])
def get_supported_precommit_models():
models = [
"efficientnet_b7",
]
if platform.machine() not in ['arm', 'armv7l', 'aarch64', 'arm64', 'ARM64']:
models.extend([
"raft_small",
"swin_v2_s",
"quantized_mobilenet_v3_large",
])
return models

@pytest.mark.parametrize("model_name", get_supported_precommit_models())
@pytest.mark.precommit
def test_convert_model_precommit(self, model_name, ie_device):
self.mode = "trace"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ def run_pa(tmp_path,
def test_pa_precommit(tmp_path, model_name, model_link, mark, reason, ie_device):
assert mark is None or mark == 'skip' or mark == 'xfail', \
"Incorrect test case: {}, {}".format(model_name, model_link)
if platform.machine() in ['arm', 'armv7l', 'aarch64', 'arm64', 'ARM64']:
pytest.skip("PagedAttention tests are not enabled on ARM")
if mark == 'skip':
pytest.skip(reason)
elif mark == 'xfail':
Expand Down
Loading