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
bd0c922a
Commit
bd0c922a
authored
Feb 10, 2026
by
zhangyue
Browse files
issue/1008: mv "import infinicore" ahead of "import" torch
parent
5675a4af
Changes
274
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
23 additions
and
13 deletions
+23
-13
test/infinicore/ops/triplet_margin_loss.py
test/infinicore/ops/triplet_margin_loss.py
+1
-1
test/infinicore/ops/triplet_margin_with_distance_loss.py
test/infinicore/ops/triplet_margin_with_distance_loss.py
+1
-1
test/infinicore/ops/trunc.py
test/infinicore/ops/trunc.py
+1
-1
test/infinicore/ops/unfold.py
test/infinicore/ops/unfold.py
+1
-1
test/infinicore/ops/unique.py
test/infinicore/ops/unique.py
+1
-1
test/infinicore/ops/upsample.py
test/infinicore/ops/upsample.py
+1
-1
test/infinicore/ops/upsample_bilinear.py
test/infinicore/ops/upsample_bilinear.py
+1
-1
test/infinicore/ops/upsample_nearest.py
test/infinicore/ops/upsample_nearest.py
+1
-1
test/infinicore/ops/vander.py
test/infinicore/ops/vander.py
+1
-1
test/infinicore/ops/var.py
test/infinicore/ops/var.py
+1
-1
test/infinicore/ops/var_mean.py
test/infinicore/ops/var_mean.py
+1
-1
test/infinicore/ops/vdot.py
test/infinicore/ops/vdot.py
+1
-1
test/infinicore/ops/where.py
test/infinicore/ops/where.py
+1
-1
test/infiniop/gelu.py
test/infiniop/gelu.py
+10
-0
No files found.
test/infinicore/ops/triplet_margin_loss.py
View file @
bd0c922a
...
...
@@ -3,8 +3,8 @@ import os
sys
.
path
.
insert
(
0
,
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
".."
))
import
torch
import
infinicore
import
torch
from
framework
import
BaseOperatorTest
,
TensorSpec
,
TestCase
,
GenericTestRunner
# Test cases format: (anchor_shape, positive_shape, negative_shape, strides_or_None, margin_or_None, p_or_None, eps_or_None, swap_or_None)
...
...
test/infinicore/ops/triplet_margin_with_distance_loss.py
View file @
bd0c922a
...
...
@@ -3,8 +3,8 @@ import os
sys
.
path
.
insert
(
0
,
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
".."
))
import
torch
import
infinicore
import
torch
from
framework
import
BaseOperatorTest
,
TensorSpec
,
TestCase
,
GenericTestRunner
# Test cases format: (anchor_shape, positive_shape, negative_shape, strides_or_None, margin_or_None, swap_or_None)
...
...
test/infinicore/ops/trunc.py
View file @
bd0c922a
...
...
@@ -3,8 +3,8 @@ import os
sys
.
path
.
insert
(
0
,
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
".."
))
import
torch
import
infinicore
import
torch
from
framework
import
(
BaseOperatorTest
,
TensorSpec
,
...
...
test/infinicore/ops/unfold.py
View file @
bd0c922a
...
...
@@ -3,8 +3,8 @@ import os
sys
.
path
.
insert
(
0
,
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
".."
))
import
torch
import
infinicore
import
torch
from
framework
import
BaseOperatorTest
,
TensorSpec
,
TestCase
,
GenericTestRunner
# Test cases format: (in_shape, in_strides_or_None, kernel_size, dilation, padding, stride)
...
...
test/infinicore/ops/unique.py
View file @
bd0c922a
...
...
@@ -3,8 +3,8 @@ import os
sys
.
path
.
insert
(
0
,
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
".."
))
import
torch
import
infinicore
import
torch
from
framework
import
(
BaseOperatorTest
,
TensorSpec
,
...
...
test/infinicore/ops/upsample.py
View file @
bd0c922a
...
...
@@ -3,8 +3,8 @@ import os
sys
.
path
.
insert
(
0
,
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
".."
))
import
torch
import
infinicore
import
torch
from
framework
import
(
BaseOperatorTest
,
TensorSpec
,
...
...
test/infinicore/ops/upsample_bilinear.py
View file @
bd0c922a
...
...
@@ -3,8 +3,8 @@ import os
sys
.
path
.
insert
(
0
,
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
".."
))
import
torch
import
infinicore
import
torch
from
framework
import
(
BaseOperatorTest
,
TensorSpec
,
...
...
test/infinicore/ops/upsample_nearest.py
View file @
bd0c922a
...
...
@@ -3,8 +3,8 @@ import os
sys
.
path
.
insert
(
0
,
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
".."
))
import
torch
import
infinicore
import
torch
from
framework
import
(
BaseOperatorTest
,
TensorSpec
,
...
...
test/infinicore/ops/vander.py
View file @
bd0c922a
...
...
@@ -3,8 +3,8 @@ import os
sys
.
path
.
insert
(
0
,
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
".."
))
import
torch
import
infinicore
import
torch
from
framework
import
BaseOperatorTest
,
TensorSpec
,
TestCase
,
GenericTestRunner
# Test cases format: (input_shape, input_strides_or_None, N)
...
...
test/infinicore/ops/var.py
View file @
bd0c922a
...
...
@@ -3,8 +3,8 @@ import os
sys
.
path
.
insert
(
0
,
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
".."
))
import
torch
import
infinicore
import
torch
from
framework
import
(
BaseOperatorTest
,
TensorSpec
,
...
...
test/infinicore/ops/var_mean.py
View file @
bd0c922a
...
...
@@ -3,8 +3,8 @@ import os
sys
.
path
.
insert
(
0
,
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
".."
))
import
torch
import
infinicore
import
torch
from
framework
import
(
BaseOperatorTest
,
TensorSpec
,
...
...
test/infinicore/ops/vdot.py
View file @
bd0c922a
...
...
@@ -3,8 +3,8 @@ import os
sys
.
path
.
insert
(
0
,
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
".."
))
import
torch
import
infinicore
import
torch
from
framework
import
BaseOperatorTest
,
TensorSpec
,
TestCase
,
GenericTestRunner
# Test cases format: (vec1_shape, vec2_shape, vec1_strides_or_None, vec2_strides_or_None)
...
...
test/infinicore/ops/where.py
View file @
bd0c922a
...
...
@@ -3,8 +3,8 @@ import os
sys
.
path
.
insert
(
0
,
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
".."
))
import
torch
import
infinicore
import
torch
from
framework
import
BaseOperatorTest
,
TensorSpec
,
TestCase
,
GenericTestRunner
# Test cases format: (condition_shape, cond_strides_or_None, x_shape_or_None, y_shape_or_None)
...
...
test/infiniop/gelu.py
View file @
bd0c922a
...
...
@@ -15,6 +15,7 @@ from libinfiniop import (
InfiniDtype
,
InfiniDtypeNames
,
InfiniDeviceNames
,
InfiniDeviceEnum
,
infiniopOperatorDescriptor_t
,
)
from
enum
import
Enum
,
auto
...
...
@@ -83,6 +84,12 @@ def test(
dtype
=
torch
.
float16
,
sync
=
None
,
):
# Skip strided cases on Iluvatar: GELU with non-contiguous tensors can hang the GPU (requires ixsmi -r to recover)
if
device
==
InfiniDeviceEnum
.
ILUVATAR
and
(
input_stride
is
not
None
or
output_stride
is
not
None
):
return
input
=
TestTensor
(
shape
,
input_stride
,
dtype
,
device
)
if
inplace
==
Inplace
.
INPLACE
:
if
input_stride
!=
output_stride
:
...
...
@@ -141,6 +148,9 @@ def test(
lib_gelu
()
if
sync
is
not
None
:
sync
()
atol
,
rtol
=
get_tolerance
(
_TOLERANCE_MAP
,
dtype
)
if
DEBUG
:
debug
(
output
.
actual_tensor
(),
output
.
torch_tensor
(),
atol
=
atol
,
rtol
=
rtol
)
...
...
Prev
1
…
10
11
12
13
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