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
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
110 additions
and
55 deletions
+110
-55
test/infinicore/ops/dot.py
test/infinicore/ops/dot.py
+1
-2
test/infinicore/ops/dropout1d.py
test/infinicore/ops/dropout1d.py
+7
-3
test/infinicore/ops/dropout2d.py
test/infinicore/ops/dropout2d.py
+7
-3
test/infinicore/ops/dropout3d.py
test/infinicore/ops/dropout3d.py
+7
-3
test/infinicore/ops/elu.py
test/infinicore/ops/elu.py
+7
-3
test/infinicore/ops/embedding.py
test/infinicore/ops/embedding.py
+1
-2
test/infinicore/ops/empty.py
test/infinicore/ops/empty.py
+1
-2
test/infinicore/ops/empty_like.py
test/infinicore/ops/empty_like.py
+1
-2
test/infinicore/ops/empty_strided.py
test/infinicore/ops/empty_strided.py
+1
-2
test/infinicore/ops/equal.py
test/infinicore/ops/equal.py
+7
-3
test/infinicore/ops/erf.py
test/infinicore/ops/erf.py
+7
-3
test/infinicore/ops/erfc.py
test/infinicore/ops/erfc.py
+7
-3
test/infinicore/ops/erfinv.py
test/infinicore/ops/erfinv.py
+7
-3
test/infinicore/ops/exp2.py
test/infinicore/ops/exp2.py
+7
-3
test/infinicore/ops/expm1.py
test/infinicore/ops/expm1.py
+7
-3
test/infinicore/ops/feature_alpha_dropout.py
test/infinicore/ops/feature_alpha_dropout.py
+7
-3
test/infinicore/ops/flip.py
test/infinicore/ops/flip.py
+7
-3
test/infinicore/ops/fliplr.py
test/infinicore/ops/fliplr.py
+7
-3
test/infinicore/ops/flipud.py
test/infinicore/ops/flipud.py
+7
-3
test/infinicore/ops/float_power.py
test/infinicore/ops/float_power.py
+7
-3
No files found.
test/infinicore/ops/dot.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: (vec1_shape, vec2_shape, vec1_strides_or_None, vec2_strides_or_None)
# infinicore.dot(a, b) — 1-D vectors; returns scalar
...
...
test/infinicore/ops/dropout1d.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, p, training, in_strides_or_None)
# infinicore.nn.functional.dropout1d(input, p=0.5, training=True)
...
...
test/infinicore/ops/dropout2d.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, p, training, in_strides_or_None)
# infinicore.nn.functional.dropout2d(input, p=0.5, training=True)
...
...
test/infinicore/ops/dropout3d.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, p, training, in_strides_or_None)
# infinicore.nn.functional.dropout3d(input, p=0.5, training=True)
...
...
test/infinicore/ops/elu.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
...
...
test/infinicore/ops/embedding.py
View file @
61a7dc0e
...
...
@@ -4,8 +4,7 @@ import sys
sys
.
path
.
insert
(
0
,
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
".."
))
import
torch
from
framework.base
import
BaseOperatorTest
,
TensorSpec
,
TestCase
from
framework.runner
import
GenericTestRunner
from
framework
import
BaseOperatorTest
,
TensorSpec
,
TestCase
,
GenericTestRunner
from
framework.tensor
import
TensorInitializer
from
framework.utils
import
(
convert_infinicore_to_torch
,
...
...
test/infinicore/ops/empty.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.datatypes
import
to_torch_dtype
from
framework.runner
import
GenericTestRunner
# Test cases format: (shape, dtype)
# Note: infinicore.empty returns uninitialized memory. Tests will compare shape and dtype via output_spec
...
...
test/infinicore/ops/empty_like.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.datatypes
import
to_torch_dtype
from
framework.runner
import
GenericTestRunner
# Test cases format: (base_shape, base_strides_or_None, dtype_or_None)
# Note: empty_like returns uninitialized memory; we validate shape/dtype via output_spec
...
...
test/infinicore/ops/empty_strided.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
from
framework.datatypes
import
to_torch_dtype
# Test cases format: (shape, stride, dtype)
...
...
test/infinicore/ops/equal.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)
# equal compares element-wise and returns boolean tensor
...
...
test/infinicore/ops/erf.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/erfc.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/erfinv.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/exp2.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)
# infinicore.exp2(input)
...
...
test/infinicore/ops/expm1.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)
# infinicore.expm1(input)
...
...
test/infinicore/ops/feature_alpha_dropout.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, p, training, in_strides_or_None)
# infinicore.nn.functional.feature_alpha_dropout(input, p=0.5, training=True)
...
...
test/infinicore/ops/flip.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, dims_tuple, input_strides_or_None)
# infinicore.flip(input, dims)
...
...
test/infinicore/ops/fliplr.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)
# infinicore.fliplr(input) flips the left/right (dim=-1 for 2D-like tensors)
...
...
test/infinicore/ops/flipud.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)
# infinicore.flipud(input) flips up/down (dim=-2 for 2D-like tensors)
...
...
test/infinicore/ops/float_power.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, exponent_scalar_or_None, exponent_tensor_shape_or_None)
# infinicore.float_power(input, exponent)
...
...
Prev
1
2
3
4
5
6
7
8
9
…
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