forked from openvinotoolkit/openvino
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request openvinotoolkit#62 from eaidova/ea/clone
ignore aten::clone
- Loading branch information
Showing
2 changed files
with
30 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Copyright (C) 2018-2022 Intel Corporation | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
import pytest | ||
from pytorch_layer_test_class import PytorchLayerTest | ||
|
||
|
||
class TestClone(PytorchLayerTest): | ||
def _prepare_input(self): | ||
import numpy as np | ||
return (np.random.randn(1, 3, 224, 224).astype(np.float32),) | ||
|
||
def create_model(self): | ||
import torch | ||
|
||
class aten_clone(torch.nn.Module): | ||
|
||
def forward(self, x): | ||
return torch.clone(x) | ||
|
||
ref_net = None | ||
|
||
return aten_clone(), ref_net, "aten::clone" | ||
|
||
@pytest.mark.nightly | ||
def test_clone(self, ie_device, precision, ir_version): | ||
self._test(*self.create_model(), ie_device, precision, ir_version) |