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
6dd619dd
Unverified
Commit
6dd619dd
authored
Dec 03, 2025
by
PanZezhong1725
Committed by
GitHub
Dec 03, 2025
Browse files
issue/700 support default tensor
parent
8c16b808
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletion
+4
-1
include/infinicore/tensor.hpp
include/infinicore/tensor.hpp
+2
-1
test/infinicore/nn/linear.py
test/infinicore/nn/linear.py
+2
-0
No files found.
include/infinicore/tensor.hpp
View file @
6dd619dd
...
@@ -75,6 +75,7 @@ public:
...
@@ -75,6 +75,7 @@ public:
const
DataType
&
dtype
,
const
DataType
&
dtype
,
const
Device
&
device
);
const
Device
&
device
);
Tensor
()
=
default
;
Tensor
(
const
Tensor
&
)
=
default
;
Tensor
(
const
Tensor
&
)
=
default
;
Tensor
(
Tensor
&&
)
=
default
;
Tensor
(
Tensor
&&
)
=
default
;
Tensor
&
operator
=
(
const
Tensor
&
)
=
default
;
Tensor
&
operator
=
(
const
Tensor
&
)
=
default
;
...
@@ -84,7 +85,7 @@ public:
...
@@ -84,7 +85,7 @@ public:
const
TensorImpl
*
operator
->
()
const
;
const
TensorImpl
*
operator
->
()
const
;
protected:
protected:
explicit
Tensor
(
std
::
shared_ptr
<
TensorImpl
>
impl
)
:
impl_
(
std
::
move
(
impl
))
{}
Tensor
(
std
::
shared_ptr
<
TensorImpl
>
impl
)
:
impl_
(
std
::
move
(
impl
))
{}
std
::
shared_ptr
<
TensorImpl
>
impl_
;
std
::
shared_ptr
<
TensorImpl
>
impl_
;
friend
class
TensorImpl
;
friend
class
TensorImpl
;
};
};
...
...
test/infinicore/nn/linear.py
View file @
6dd619dd
...
@@ -21,6 +21,8 @@ _TEST_CASES_DATA = [
...
@@ -21,6 +21,8 @@ _TEST_CASES_DATA = [
((
4
,
10
),
(
2
,
10
),
(
2
,),
False
),
((
4
,
10
),
(
2
,
10
),
(
2
,),
False
),
((
1
,
1024
),
(
3072
,
1024
),
(
3072
,),
True
),
((
1
,
1024
),
(
3072
,
1024
),
(
3072
,),
True
),
((
5
,
1024
),
(
3072
,
1024
),
(
3072
,),
False
),
((
5
,
1024
),
(
3072
,
1024
),
(
3072
,),
False
),
((
2
,
5
,
1024
),
(
3072
,
1024
),
(
3072
,),
True
),
((
10
,
5
,
1024
),
(
3072
,
1024
),
(
3072
,),
False
),
]
]
# Tolerance configuration
# Tolerance configuration
...
...
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