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
193f8780
Commit
193f8780
authored
Apr 08, 2025
by
MaHang
Browse files
根据review意见修改
parent
dd101970
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
6 deletions
+4
-6
src/infiniop-test/src/ops/swiglu.cpp
src/infiniop-test/src/ops/swiglu.cpp
+4
-4
test/infiniop-test/test_generate/testcases/swiglu.py
test/infiniop-test/test_generate/testcases/swiglu.py
+0
-2
No files found.
src/infiniop-test/src/ops/swiglu.cpp
View file @
193f8780
...
...
@@ -46,9 +46,9 @@ std::shared_ptr<infiniop_test::Result> Test::run(
b
->
desc
()),
return
TEST_FAILED
(
OP_CREATION_FAILED
,
"Failed to create op descriptor."
));
CHECK_OR
(
infiniopSwiGLU
(
op_desc
,
c
->
data
(),
a
->
data
(),
b
->
data
(),
nullptr
),
return
TEST_FAILED
(
OP_CREATION_FAILED
,
"Failed
to create op descriptor
."
));
return
TEST_FAILED
(
OP_CREATION_FAILED
,
"Failed
during execution
."
));
try
{
allClose
(
c
,
_attributes
->
ans
);
allClose
(
c
,
_attributes
->
ans
,
_rtol
,
_atol
);
}
catch
(
const
std
::
exception
&
e
)
{
return
TEST_FAILED
(
RESULT_INCORRECT
,
e
.
what
());
}
...
...
@@ -63,7 +63,7 @@ std::shared_ptr<infiniop_test::Result> Test::run(
b
->
data
(),
nullptr
);
},
(
warm_ups
+
1
)
/
2
,
(
iterations
+
1
)
/
2
);
warm_ups
,
iterations
);
return
TEST_PASSED
(
elapsed_time
);
}
...
...
test/infiniop-test/test_generate/testcases/swiglu.py
View file @
193f8780
from
ast
import
List
import
numpy
as
np
import
gguf
from
typing
import
List
...
...
@@ -53,7 +52,6 @@ class SwiGLUTestCase(InfiniopTestCase):
ans
=
swiglu
(
self
.
a
.
astype
(
np
.
float64
),
self
.
b
.
astype
(
np
.
float64
),
# None,
)
test_writer
.
add_tensor
(
test_writer
.
gguf_key
(
"ans"
),
ans
,
raw_dtype
=
gguf
.
GGMLQuantizationType
.
F64
...
...
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