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
15bcbdfc
Commit
15bcbdfc
authored
Apr 30, 2025
by
Catheriany
Browse files
issue/150: rope算子测例
parent
b82153fe
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
17 deletions
+17
-17
src/infiniop/ops/rope/cuda/rope_cuda.cu
src/infiniop/ops/rope/cuda/rope_cuda.cu
+0
-1
test/infiniop-test/test_generate/testcases/rope.py
test/infiniop-test/test_generate/testcases/rope.py
+17
-16
No files found.
src/infiniop/ops/rope/cuda/rope_cuda.cu
View file @
15bcbdfc
...
...
@@ -46,7 +46,6 @@ infiniStatus_t calculateRoPE(const RoPEInfo &info,
const
Tdata
*
sin_table
,
const
Tdata
*
cos_table
,
cudaStream_t
stream
)
{
auto
dimx
=
uint32_t
(
info
.
seqlen
),
dimy
=
uint32_t
(
info
.
nhead
);
int
nthreads
=
std
::
max
(
int
(
info
.
table_dim
),
block_size
);
...
...
test/infiniop-test/test_generate/testcases/rope.py
View file @
15bcbdfc
...
...
@@ -92,11 +92,15 @@ class RoPETestCase(InfiniopTestCase):
test_writer
.
gguf_key
(
"ans"
),
ans
,
raw_dtype
=
gguf
.
GGMLQuantizationType
.
F64
)
# ==============================================================================
# Configuration (Internal Use Only)
# ==============================================================================
# These are not meant to be imported from other modules
_TEST_CASES_
=
[
if
__name__
==
"__main__"
:
# ==============================================================================
# Configuration (Internal Use Only)
# ==============================================================================
# These are not meant to be imported from other modules
_TEST_CASES_
=
[
# (shape, x_strides, y_strides)
((
1
,
32
,
128
),
None
,
None
),
((
10
,
32
,
64
),
None
,
None
),
...
...
@@ -105,12 +109,9 @@ _TEST_CASES_ = [
((
4
,
1
,
32
),
gguf_strides
(
64
,
64
,
1
),
None
),
((
11
,
33
,
128
),
None
,
gguf_strides
(
8000
,
200
,
1
)),
((
3
,
32
,
128
),
gguf_strides
(
8000
,
200
,
1
),
gguf_strides
(
7000
,
128
,
1
)),
]
]
_TENSOR_DTYPES_
=
[
np
.
float16
,
np
.
float32
]
if
__name__
==
"__main__"
:
_TENSOR_DTYPES_
=
[
np
.
float16
,
np
.
float32
]
test_writer
=
InfiniopTestWriter
(
"rope.gguf"
)
test_cases
=
[]
...
...
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