diff --git a/tests/layer_tests/pytorch_tests/test_div.py b/tests/layer_tests/pytorch_tests/test_div.py index f6f24512b1b251..eb46f4812f2595 100644 --- a/tests/layer_tests/pytorch_tests/test_div.py +++ b/tests/layer_tests/pytorch_tests/test_div.py @@ -27,36 +27,51 @@ def forward(self, input_tensor, other_tensor): return aten_div(rounding_mode), ref_net, "aten::div" @pytest.mark.parametrize(("input_array", "other_array"), [ - [np.random.rand(5, 5), np.random.rand(1)], - [np.random.rand(5, 5, 1), np.random.rand(1)], - [np.random.rand(1, 1, 5, 5), np.random.rand(1)], - [np.random.rand(5, 5, 1), np.random.rand(5, 1)], - [np.random.rand(5, 5), np.random.rand(5, 5)], - [np.array([ 0.7620, 2.5548, -0.5944, -0.7438, 0.9274]), np.array(0.5)], + [10 * np.random.rand(5, 5), np.random.uniform(low=1, high=5, size=(1))], + [10 * np.random.rand(5, 5, 1), np.random.uniform(low=1, high=5, size=(1))], + [10 * np.random.rand(1, 1, 5, 5), np.random.uniform( + low=1, high=5, size=(1))], + [10 * np.random.rand(5, 5, 1), np.random.uniform( + low=1, high=5, size=(5, 1))] + ]) + @pytest.mark.parametrize(("types"), [ + (np.float32, np.float32), + pytest.param((np.int32, np.float32), marks=pytest.mark.xfail), + pytest.param((np.float32, np.int32), marks=pytest.mark.xfail), + pytest.param((np.int32, np.int32), marks=pytest.mark.xfail) + ]) + @pytest.mark.parametrize('rounding_mode', ([ + None, + "floor", + "trunc" + ])) + @pytest.mark.nightly + def test_div(self, input_array, other_array, types, rounding_mode, ie_device, precision, ir_version): + self.input_array = input_array + self.input_type = types[0] + self.other_array = other_array + self.other_type = types[1] + self._test(*self.create_model(rounding_mode), + ie_device, precision, ir_version) + + @pytest.mark.parametrize(("input_array", "other_array"), [ + [np.array([0.7620, 2.5548, -0.5944, -0.7438, 0.9274]), np.array(0.5)], [np.array([[-0.3711, -1.9353, -0.4605, -0.2917], - [ 0.1815, -1.0111, 0.9805, -1.5923], - [ 0.1062, 1.4581, 0.7759, -1.2344], + [0.1815, -1.0111, 0.9805, -1.5923], + [0.1062, 1.4581, 0.7759, -1.2344], [-0.1830, -0.0313, 1.1908, -1.4757]]), np.array([0.8032, 0.2930, -0.8113, -0.2308])] ]) - @pytest.mark.parametrize(("input_type"), [ - np.int32, - np.float32 - ]) - @pytest.mark.parametrize(("other_type"), [ - np.int32, - np.float32 - ]) @pytest.mark.parametrize('rounding_mode', ([ None, "floor", "trunc" ])) - @pytest.mark.nightly - def test_div(self, input_array, input_type, other_array, other_type, rounding_mode, ie_device, precision, ir_version): + def test_div_pt_spec(self, input_array, other_array, rounding_mode, ie_device, precision, ir_version): self.input_array = input_array - self.input_type = input_type + self.input_type = np.float32 self.other_array = other_array - self.other_type = other_type - self._test(*self.create_model(rounding_mode), ie_device, precision, ir_version) + self.other_type = np.float32 + self._test(*self.create_model(rounding_mode), + ie_device, precision, ir_version)