Commit 61a7dc0e authored by wooway777's avatar wooway777
Browse files

issue/666 - Standardized test imports

parent 406c9668
...@@ -5,9 +5,13 @@ sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..")) ...@@ -5,9 +5,13 @@ sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
import torch import torch
import infinicore import infinicore
from framework.base import BaseOperatorTest, TensorSpec, TestCase from framework import (
from framework.runner import GenericTestRunner BaseOperatorTest,
from framework.utils import is_broadcast TensorSpec,
TestCase,
GenericTestRunner,
is_broadcast,
)
# Test cases format: (shape, a_strides_or_None, b_strides_or_None, out_strides_or_None) # Test cases format: (shape, a_strides_or_None, b_strides_or_None, out_strides_or_None)
# ============================================================================== # ==============================================================================
......
...@@ -5,9 +5,13 @@ sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..")) ...@@ -5,9 +5,13 @@ sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
import torch import torch
import infinicore import infinicore
from framework.base import BaseOperatorTest, TensorSpec, TestCase from framework import (
from framework.runner import GenericTestRunner BaseOperatorTest,
from framework.utils import is_broadcast TensorSpec,
TestCase,
GenericTestRunner,
is_broadcast,
)
# Test cases format: (shape, a_strides_or_None, b_strides_or_None, out_strides_or_None) # Test cases format: (shape, a_strides_or_None, b_strides_or_None, out_strides_or_None)
......
...@@ -5,9 +5,13 @@ sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..")) ...@@ -5,9 +5,13 @@ sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
import torch import torch
import infinicore import infinicore
from framework.base import BaseOperatorTest, TensorSpec, TestCase from framework import (
from framework.runner import GenericTestRunner BaseOperatorTest,
from framework.utils import is_broadcast TensorSpec,
TestCase,
GenericTestRunner,
is_broadcast,
)
# ============================================================================== # ==============================================================================
# Operator-specific configuration # Operator-specific configuration
......
...@@ -5,8 +5,7 @@ sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..")) ...@@ -5,8 +5,7 @@ sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
import torch import torch
import infinicore import infinicore
from framework.base import BaseOperatorTest, TensorSpec, TestCase from framework import BaseOperatorTest, TensorSpec, TestCase, GenericTestRunner
from framework.runner import GenericTestRunner
# Test cases format: (list_of_matrix_shapes, list_of_strides_or_None, dtype) # Test cases format: (list_of_matrix_shapes, list_of_strides_or_None, dtype)
......
...@@ -5,9 +5,13 @@ sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..")) ...@@ -5,9 +5,13 @@ sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
import torch import torch
import infinicore import infinicore
from framework.base import BaseOperatorTest, TensorSpec, TestCase from framework import (
from framework.runner import GenericTestRunner BaseOperatorTest,
from framework.utils import is_broadcast TensorSpec,
TestCase,
GenericTestRunner,
is_broadcast,
)
# Test cases format: (input_shape, input_strides_or_None, target_shape) # Test cases format: (input_shape, input_strides_or_None, target_shape)
_TEST_CASES_DATA = [ _TEST_CASES_DATA = [
......
...@@ -5,8 +5,7 @@ sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..")) ...@@ -5,8 +5,7 @@ sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
import torch import torch
import infinicore import infinicore
from framework.base import BaseOperatorTest, TensorSpec, TestCase from framework import BaseOperatorTest, TensorSpec, TestCase, GenericTestRunner
from framework.runner import GenericTestRunner
# Test cases format: (input_shape, input_strides_or_None, boundaries_len) # Test cases format: (input_shape, input_strides_or_None, boundaries_len)
_TEST_CASES_DATA = [ _TEST_CASES_DATA = [
......
...@@ -5,9 +5,13 @@ sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..")) ...@@ -5,9 +5,13 @@ sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
import torch import torch
import infinicore import infinicore
from framework.base import BaseOperatorTest, TensorSpec, TestCase from framework import (
from framework.runner import GenericTestRunner BaseOperatorTest,
from framework.utils import is_broadcast TensorSpec,
TestCase,
GenericTestRunner,
is_broadcast,
)
# ============================================================================== # ==============================================================================
# Operator-specific configuration # Operator-specific configuration
......
...@@ -5,9 +5,13 @@ sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..")) ...@@ -5,9 +5,13 @@ sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
import torch import torch
import infinicore import infinicore
from framework.base import BaseOperatorTest, TensorSpec, TestCase from framework import (
from framework.runner import GenericTestRunner BaseOperatorTest,
from framework.utils import is_broadcast TensorSpec,
TestCase,
GenericTestRunner,
is_broadcast,
)
# ============================================================================== # ==============================================================================
# Operator-specific configuration # Operator-specific configuration
......
...@@ -5,8 +5,7 @@ sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..")) ...@@ -5,8 +5,7 @@ sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
import torch import torch
import infinicore import infinicore
from framework.base import BaseOperatorTest, TensorSpec, TestCase from framework import BaseOperatorTest, TensorSpec, TestCase, GenericTestRunner
from framework.runner import GenericTestRunner
# Test cases format: (x1_shape, x2_shape, x1_strides_or_None, x2_strides_or_None, p_or_None) # Test cases format: (x1_shape, x2_shape, x1_strides_or_None, x2_strides_or_None, p_or_None)
......
...@@ -5,9 +5,13 @@ sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..")) ...@@ -5,9 +5,13 @@ sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
import torch import torch
import infinicore import infinicore
from framework.base import BaseOperatorTest, TensorSpec, TestCase from framework import (
from framework.runner import GenericTestRunner BaseOperatorTest,
from framework.utils import is_broadcast TensorSpec,
TestCase,
GenericTestRunner,
is_broadcast,
)
# Test cases format: (in_shape, in_strides_or_None, alpha_or_None) # Test cases format: (in_shape, in_strides_or_None, alpha_or_None)
......
...@@ -5,8 +5,7 @@ sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..")) ...@@ -5,8 +5,7 @@ sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
import torch import torch
import infinicore import infinicore
from framework.base import BaseOperatorTest, TensorSpec, TestCase from framework import BaseOperatorTest, TensorSpec, TestCase, GenericTestRunner
from framework.runner import GenericTestRunner
# Test cases format: (shape, input_strides_or_None) # Test cases format: (shape, input_strides_or_None)
_TEST_CASES_DATA = [ _TEST_CASES_DATA = [
......
...@@ -5,8 +5,7 @@ sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..")) ...@@ -5,8 +5,7 @@ sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
import torch import torch
import infinicore import infinicore
from framework.base import BaseOperatorTest, TensorSpec, TestCase from framework import BaseOperatorTest, TensorSpec, TestCase, GenericTestRunner
from framework.runner import GenericTestRunner
# Test cases format: (input_shape, input_strides_or_None, r) # Test cases format: (input_shape, input_strides_or_None, r)
# combinations operates on 1-D inputs (combinations of elements). We keep inputs small. # combinations operates on 1-D inputs (combinations of elements). We keep inputs small.
......
...@@ -5,9 +5,13 @@ sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..")) ...@@ -5,9 +5,13 @@ sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
import torch import torch
import infinicore import infinicore
from framework.base import BaseOperatorTest, TensorSpec, TestCase from framework import (
from framework.runner import GenericTestRunner BaseOperatorTest,
from framework.utils import is_broadcast TensorSpec,
TestCase,
GenericTestRunner,
is_broadcast,
)
# Test cases: (in_shape, in_strides_or_None, weight_shape, bias_shape_or_None, stride, padding, dilation, groups) # Test cases: (in_shape, in_strides_or_None, weight_shape, bias_shape_or_None, stride, padding, dilation, groups)
......
...@@ -5,9 +5,13 @@ sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..")) ...@@ -5,9 +5,13 @@ sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
import torch import torch
import infinicore import infinicore
from framework.base import BaseOperatorTest, TensorSpec, TestCase from framework import (
from framework.runner import GenericTestRunner BaseOperatorTest,
from framework.utils import is_broadcast TensorSpec,
TestCase,
GenericTestRunner,
is_broadcast,
)
# Test cases: (in_shape, in_strides_or_None, weight_shape, bias_shape_or_None, stride, padding, dilation, groups) # Test cases: (in_shape, in_strides_or_None, weight_shape, bias_shape_or_None, stride, padding, dilation, groups)
......
...@@ -5,9 +5,13 @@ sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..")) ...@@ -5,9 +5,13 @@ sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
import torch import torch
import infinicore import infinicore
from framework.base import BaseOperatorTest, TensorSpec, TestCase from framework import (
from framework.runner import GenericTestRunner BaseOperatorTest,
from framework.utils import is_broadcast TensorSpec,
TestCase,
GenericTestRunner,
is_broadcast,
)
# Test cases: (in_shape, in_strides_or_None, weight_shape, bias_shape_or_None, stride, padding, dilation, groups) # Test cases: (in_shape, in_strides_or_None, weight_shape, bias_shape_or_None, stride, padding, dilation, groups)
......
...@@ -5,9 +5,13 @@ sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..")) ...@@ -5,9 +5,13 @@ sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
import torch import torch
import infinicore import infinicore
from framework.base import BaseOperatorTest, TensorSpec, TestCase from framework import (
from framework.runner import GenericTestRunner BaseOperatorTest,
from framework.utils import is_broadcast TensorSpec,
TestCase,
GenericTestRunner,
is_broadcast,
)
# Test cases: (in_shape, in_strides_or_None, weight_shape, bias_shape_or_None, stride, padding, output_padding, groups) # Test cases: (in_shape, in_strides_or_None, weight_shape, bias_shape_or_None, stride, padding, output_padding, groups)
......
...@@ -5,9 +5,13 @@ sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..")) ...@@ -5,9 +5,13 @@ sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
import torch import torch
import infinicore import infinicore
from framework.base import BaseOperatorTest, TensorSpec, TestCase from framework import (
from framework.runner import GenericTestRunner BaseOperatorTest,
from framework.utils import is_broadcast TensorSpec,
TestCase,
GenericTestRunner,
is_broadcast,
)
# Test cases: (in_shape, in_strides_or_None, weight_shape, bias_shape_or_None, stride, padding, output_padding, groups) # Test cases: (in_shape, in_strides_or_None, weight_shape, bias_shape_or_None, stride, padding, output_padding, groups)
......
...@@ -5,9 +5,13 @@ sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..")) ...@@ -5,9 +5,13 @@ sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
import torch import torch
import infinicore import infinicore
from framework.base import BaseOperatorTest, TensorSpec, TestCase from framework import (
from framework.runner import GenericTestRunner BaseOperatorTest,
from framework.utils import is_broadcast TensorSpec,
TestCase,
GenericTestRunner,
is_broadcast,
)
# Test cases: (in_shape, in_strides_or_None, weight_shape, bias_shape_or_None, stride, padding, output_padding, groups) # Test cases: (in_shape, in_strides_or_None, weight_shape, bias_shape_or_None, stride, padding, output_padding, groups)
......
...@@ -5,8 +5,7 @@ sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..")) ...@@ -5,8 +5,7 @@ sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
import torch import torch
import infinicore import infinicore
from framework.base import BaseOperatorTest, TensorSpec, TestCase from framework import BaseOperatorTest, TensorSpec, TestCase, GenericTestRunner
from framework.runner import GenericTestRunner
# Test cases format: (input_shape, input_strides_or_None) # Test cases format: (input_shape, input_strides_or_None)
# corrcoef accepts 1-D or 2-D inputs; we include both shapes. # corrcoef accepts 1-D or 2-D inputs; we include both shapes.
......
...@@ -5,9 +5,13 @@ sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..")) ...@@ -5,9 +5,13 @@ sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
import torch import torch
import infinicore import infinicore
from framework.base import BaseOperatorTest, TensorSpec, TestCase from framework import (
from framework.runner import GenericTestRunner BaseOperatorTest,
from framework.utils import is_broadcast TensorSpec,
TestCase,
GenericTestRunner,
is_broadcast,
)
# ======================================================================= # =======================================================================
# Test cases format: (shape, input_strides_or_None) # Test cases format: (shape, input_strides_or_None)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment