Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jerrrrry
infinicore
Commits
61a7dc0e
Commit
61a7dc0e
authored
Nov 24, 2025
by
wooway777
Browse files
issue/666 - Standardized test imports
parent
406c9668
Changes
268
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
104 additions
and
54 deletions
+104
-54
test/infinicore/ops/aminmax.py
test/infinicore/ops/aminmax.py
+7
-3
test/infinicore/ops/any.py
test/infinicore/ops/any.py
+7
-3
test/infinicore/ops/argmax.py
test/infinicore/ops/argmax.py
+7
-3
test/infinicore/ops/argmin.py
test/infinicore/ops/argmin.py
+7
-3
test/infinicore/ops/argsort.py
test/infinicore/ops/argsort.py
+7
-3
test/infinicore/ops/argwhere.py
test/infinicore/ops/argwhere.py
+1
-2
test/infinicore/ops/asin.py
test/infinicore/ops/asin.py
+7
-3
test/infinicore/ops/asinh.py
test/infinicore/ops/asinh.py
+7
-3
test/infinicore/ops/atan.py
test/infinicore/ops/atan.py
+7
-3
test/infinicore/ops/atan2.py
test/infinicore/ops/atan2.py
+7
-3
test/infinicore/ops/atanh.py
test/infinicore/ops/atanh.py
+7
-3
test/infinicore/ops/avg_pool1d.py
test/infinicore/ops/avg_pool1d.py
+7
-3
test/infinicore/ops/avg_pool2d.py
test/infinicore/ops/avg_pool2d.py
+7
-3
test/infinicore/ops/avg_pool3d.py
test/infinicore/ops/avg_pool3d.py
+7
-3
test/infinicore/ops/baddbmm.py
test/infinicore/ops/baddbmm.py
+7
-3
test/infinicore/ops/batch_norm.py
test/infinicore/ops/batch_norm.py
+1
-2
test/infinicore/ops/bilinear.py
test/infinicore/ops/bilinear.py
+1
-2
test/infinicore/ops/binary_cross_entropy.py
test/infinicore/ops/binary_cross_entropy.py
+1
-2
test/infinicore/ops/binary_cross_entropy_with_logits.py
test/infinicore/ops/binary_cross_entropy_with_logits.py
+1
-2
test/infinicore/ops/bincount.py
test/infinicore/ops/bincount.py
+1
-2
No files found.
test/infinicore/ops/aminmax.py
View file @
61a7dc0e
...
...
@@ -5,9 +5,13 @@ sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
import
torch
import
infinicore
from
framework.base
import
BaseOperatorTest
,
TensorSpec
,
TestCase
from
framework.runner
import
GenericTestRunner
from
framework.utils
import
is_broadcast
from
framework
import
(
BaseOperatorTest
,
TensorSpec
,
TestCase
,
GenericTestRunner
,
is_broadcast
,
)
# ==============================================================================
# Operator-specific configuration for aminmax
...
...
test/infinicore/ops/any.py
View file @
61a7dc0e
...
...
@@ -5,9 +5,13 @@ sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
import
torch
import
infinicore
from
framework.base
import
BaseOperatorTest
,
TensorSpec
,
TestCase
from
framework.runner
import
GenericTestRunner
from
framework.utils
import
is_broadcast
from
framework
import
(
BaseOperatorTest
,
TensorSpec
,
TestCase
,
GenericTestRunner
,
is_broadcast
,
)
# Test cases format: (in_shape, in_strides_or_None, dim_or_None, keepdim_or_None, out_strides_or_None)
...
...
test/infinicore/ops/argmax.py
View file @
61a7dc0e
...
...
@@ -5,9 +5,13 @@ sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
import
torch
import
infinicore
from
framework.base
import
BaseOperatorTest
,
TensorSpec
,
TestCase
from
framework.runner
import
GenericTestRunner
from
framework.utils
import
is_broadcast
from
framework
import
(
BaseOperatorTest
,
TensorSpec
,
TestCase
,
GenericTestRunner
,
is_broadcast
,
)
# Test cases format: (in_shape, in_strides_or_None, dim_or_None, keepdim_or_None)
...
...
test/infinicore/ops/argmin.py
View file @
61a7dc0e
...
...
@@ -5,9 +5,13 @@ sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
import
torch
import
infinicore
from
framework.base
import
BaseOperatorTest
,
TensorSpec
,
TestCase
from
framework.runner
import
GenericTestRunner
from
framework.utils
import
is_broadcast
from
framework
import
(
BaseOperatorTest
,
TensorSpec
,
TestCase
,
GenericTestRunner
,
is_broadcast
,
)
# Test cases format: (in_shape, in_strides_or_None, dim_or_None, keepdim_or_None)
...
...
test/infinicore/ops/argsort.py
View file @
61a7dc0e
...
...
@@ -5,9 +5,13 @@ sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
import
torch
import
infinicore
from
framework.base
import
BaseOperatorTest
,
TensorSpec
,
TestCase
from
framework.runner
import
GenericTestRunner
from
framework.utils
import
is_broadcast
from
framework
import
(
BaseOperatorTest
,
TensorSpec
,
TestCase
,
GenericTestRunner
,
is_broadcast
,
)
# Test cases format: (shape, input_strides, dim, descending)
_TEST_CASES_DATA
=
[
...
...
test/infinicore/ops/argwhere.py
View file @
61a7dc0e
...
...
@@ -5,8 +5,7 @@ sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
import
torch
import
infinicore
from
framework.base
import
BaseOperatorTest
,
TensorSpec
,
TestCase
from
framework.runner
import
GenericTestRunner
from
framework
import
BaseOperatorTest
,
TensorSpec
,
TestCase
,
GenericTestRunner
# Test cases format: (input_shape, input_strides_or_None)
_TEST_CASES_DATA
=
[
...
...
test/infinicore/ops/asin.py
View file @
61a7dc0e
...
...
@@ -5,9 +5,13 @@ sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
import
torch
import
infinicore
from
framework.base
import
BaseOperatorTest
,
TensorSpec
,
TestCase
from
framework.runner
import
GenericTestRunner
from
framework.utils
import
is_broadcast
from
framework
import
(
BaseOperatorTest
,
TensorSpec
,
TestCase
,
GenericTestRunner
,
is_broadcast
,
)
# =======================================================================
# Test cases format: (shape, input_strides_or_None)
...
...
test/infinicore/ops/asinh.py
View file @
61a7dc0e
...
...
@@ -5,9 +5,13 @@ sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
import
torch
import
infinicore
from
framework.base
import
BaseOperatorTest
,
TensorSpec
,
TestCase
from
framework.runner
import
GenericTestRunner
from
framework.utils
import
is_broadcast
from
framework
import
(
BaseOperatorTest
,
TensorSpec
,
TestCase
,
GenericTestRunner
,
is_broadcast
,
)
# =======================================================================
# Test cases format: (shape, input_strides_or_None)
...
...
test/infinicore/ops/atan.py
View file @
61a7dc0e
...
...
@@ -5,9 +5,13 @@ sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
import
torch
import
infinicore
from
framework.base
import
BaseOperatorTest
,
TensorSpec
,
TestCase
from
framework.runner
import
GenericTestRunner
from
framework.utils
import
is_broadcast
from
framework
import
(
BaseOperatorTest
,
TensorSpec
,
TestCase
,
GenericTestRunner
,
is_broadcast
,
)
# =======================================================================
# Test cases format: (shape, input_strides_or_None)
...
...
test/infinicore/ops/atan2.py
View file @
61a7dc0e
...
...
@@ -5,9 +5,13 @@ sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
import
torch
import
infinicore
from
framework.base
import
BaseOperatorTest
,
TensorSpec
,
TestCase
from
framework.runner
import
GenericTestRunner
from
framework.utils
import
is_broadcast
from
framework
import
(
BaseOperatorTest
,
TensorSpec
,
TestCase
,
GenericTestRunner
,
is_broadcast
,
)
# =======================================================================
# Test cases format: (shape, a_strides_or_None, b_strides_or_None, out_strides_or_None)
...
...
test/infinicore/ops/atanh.py
View file @
61a7dc0e
...
...
@@ -5,9 +5,13 @@ sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
import
torch
import
infinicore
from
framework.base
import
BaseOperatorTest
,
TensorSpec
,
TestCase
from
framework.runner
import
GenericTestRunner
from
framework.utils
import
is_broadcast
from
framework
import
(
BaseOperatorTest
,
TensorSpec
,
TestCase
,
GenericTestRunner
,
is_broadcast
,
)
# =======================================================================
# Test cases format: (shape, input_strides_or_None)
...
...
test/infinicore/ops/avg_pool1d.py
View file @
61a7dc0e
...
...
@@ -5,9 +5,13 @@ sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
import
torch
import
infinicore
from
framework.base
import
BaseOperatorTest
,
TensorSpec
,
TestCase
from
framework.runner
import
GenericTestRunner
from
framework.utils
import
is_broadcast
from
framework
import
(
BaseOperatorTest
,
TensorSpec
,
TestCase
,
GenericTestRunner
,
is_broadcast
,
)
# Test cases format: (in_shape, in_strides_or_None, kernel_size, stride_or_None, padding)
...
...
test/infinicore/ops/avg_pool2d.py
View file @
61a7dc0e
...
...
@@ -5,9 +5,13 @@ sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
import
torch
import
infinicore
from
framework.base
import
BaseOperatorTest
,
TensorSpec
,
TestCase
from
framework.runner
import
GenericTestRunner
from
framework.utils
import
is_broadcast
from
framework
import
(
BaseOperatorTest
,
TensorSpec
,
TestCase
,
GenericTestRunner
,
is_broadcast
,
)
# Test cases: (in_shape, in_strides_or_None, kernel_size, stride_or_None, padding)
...
...
test/infinicore/ops/avg_pool3d.py
View file @
61a7dc0e
...
...
@@ -5,9 +5,13 @@ sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
import
torch
import
infinicore
from
framework.base
import
BaseOperatorTest
,
TensorSpec
,
TestCase
from
framework.runner
import
GenericTestRunner
from
framework.utils
import
is_broadcast
from
framework
import
(
BaseOperatorTest
,
TensorSpec
,
TestCase
,
GenericTestRunner
,
is_broadcast
,
)
# Test cases format: (in_shape, in_strides_or_None, kernel_size, stride_or_None, padding)
...
...
test/infinicore/ops/baddbmm.py
View file @
61a7dc0e
...
...
@@ -5,9 +5,13 @@ sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
import
torch
import
infinicore
from
framework.base
import
BaseOperatorTest
,
TensorSpec
,
TestCase
from
framework.runner
import
GenericTestRunner
from
framework.utils
import
is_broadcast
from
framework
import
(
BaseOperatorTest
,
TensorSpec
,
TestCase
,
GenericTestRunner
,
is_broadcast
,
)
# Test cases format: (input_shape, batch1_shape, batch2_shape, input_strides_or_None, batch1_strides_or_None, batch2_strides_or_None, beta_or_None, alpha_or_None)
...
...
test/infinicore/ops/batch_norm.py
View file @
61a7dc0e
...
...
@@ -5,8 +5,7 @@ sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
import
torch
import
infinicore
from
framework.base
import
BaseOperatorTest
,
TensorSpec
,
TestCase
from
framework.runner
import
GenericTestRunner
from
framework
import
BaseOperatorTest
,
TensorSpec
,
TestCase
,
GenericTestRunner
# Test cases format: (input_shape, input_strides_or_None, running_mean_present_bool, running_var_present_bool, weight_bias_present_bool, training_or_None, momentum_or_None, eps_or_None)
_TEST_CASES_DATA
=
[
...
...
test/infinicore/ops/bilinear.py
View file @
61a7dc0e
...
...
@@ -5,8 +5,7 @@ sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
import
torch
import
infinicore
from
framework.base
import
BaseOperatorTest
,
TensorSpec
,
TestCase
from
framework.runner
import
GenericTestRunner
from
framework
import
BaseOperatorTest
,
TensorSpec
,
TestCase
,
GenericTestRunner
# Test cases format: (in1_shape, in2_shape, weight_shape, in1_strides_or_None, in2_strides_or_None, weight_strides_or_None, bias_present_bool)
...
...
test/infinicore/ops/binary_cross_entropy.py
View file @
61a7dc0e
...
...
@@ -5,8 +5,7 @@ sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
import
torch
import
infinicore
from
framework.base
import
BaseOperatorTest
,
TensorSpec
,
TestCase
from
framework.runner
import
GenericTestRunner
from
framework
import
BaseOperatorTest
,
TensorSpec
,
TestCase
,
GenericTestRunner
# Test cases format: (input_shape, input_strides_or_None, weight_present_bool, reduction_or_None)
...
...
test/infinicore/ops/binary_cross_entropy_with_logits.py
View file @
61a7dc0e
...
...
@@ -5,8 +5,7 @@ sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
import
torch
import
infinicore
from
framework.base
import
BaseOperatorTest
,
TensorSpec
,
TestCase
from
framework.runner
import
GenericTestRunner
from
framework
import
BaseOperatorTest
,
TensorSpec
,
TestCase
,
GenericTestRunner
# Test cases format: (input_shape, input_strides_or_None, weight_present_bool, pos_weight_present_bool, reduction_or_None)
...
...
test/infinicore/ops/bincount.py
View file @
61a7dc0e
...
...
@@ -5,9 +5,8 @@ sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
import
torch
import
infinicore
from
framework
.base
import
BaseOperatorTest
,
TensorSpec
,
TestCase
from
framework
import
BaseOperatorTest
,
TensorSpec
,
TestCase
,
GenericTestRunner
from
framework.tensor
import
TensorInitializer
from
framework.runner
import
GenericTestRunner
# Test cases format: (input_shape, input_strides_or_None, weights_present_bool, minlength)
_TEST_CASES_DATA
=
[
...
...
Prev
1
2
3
4
5
6
…
14
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment