Files
openvino/tests/layer_tests/tensorflow_tests/test_tf_LinSpace.py
Andrey Kashchikhin b67cff7cd5 [CI] [GHA] Introduce macOS ARM64 as a matrix parameter in the macOS pipeline (#20363)
* add m1 mac pipelines as a matrix parameter

* Update mac.yml

disable java_api because of macos arm64 - Java is not available on macOS arm64 runners

* Update mac.yml

added always condition for all tests

* Update mac.yml

* Update mac.yml

* Update mac.yml

* Update setup.py

temp commit

* Update tools/openvino_dev/setup.py

* use matrix for var

* add mxnet to extras only for x86_64

* skip failing tests

* use xfail for Python tests; add missing filter for transformations tests

* skip CPU func tests on x86_64 mac; skip some tests from CPU func tests on arm mac

* Update mac.yml

* skip tests on mac arm

* skip tests on darwin; apply review

* add more skips for python and c++ tests

* skip tf tests

* skip more tf tests; skip more Python UT stages

* rm alwayses, rm triggers, add nightly trigger

---------

Co-authored-by: Ilya Lavrenov <ilya.lavrenov@intel.com>
2023-10-23 15:06:22 +04:00

40 lines
1.4 KiB
Python

# Copyright (C) 2018-2023 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import platform
import pytest
import tensorflow as tf
from common.tf_layer_test_class import CommonTFLayerTest
class TestLinSpace(CommonTFLayerTest):
def create_lin_space_net(self, num_value):
tf.compat.v1.reset_default_graph()
# Create the graph and model
with tf.compat.v1.Session() as sess:
start = tf.compat.v1.placeholder(tf.float32, [], 'start')
stop = tf.compat.v1.placeholder(tf.float32, [], 'stop')
tf.raw_ops.LinSpace(start=start, stop=stop, num=num_value)
tf.compat.v1.global_variables_initializer()
tf_net = sess.graph_def
return tf_net, None
test_data_basic = [
dict(num_value=2),
dict(num_value=10),
]
@pytest.mark.parametrize("params", test_data_basic)
@pytest.mark.precommit_tf_fe
@pytest.mark.nightly
@pytest.mark.xfail(condition=platform.system() == 'Darwin' and platform.machine() == 'arm64',
reason='Ticket - 122716')
def test_lin_space_basic(self, params, ie_device, precision, ir_version, temp_dir,
use_new_frontend, use_old_api):
self._test(*self.create_lin_space_net(**params),
ie_device, precision, ir_version, temp_dir=temp_dir,
use_new_frontend=use_new_frontend, use_old_api=use_old_api)