Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
dcc56d62
Unverified
Commit
dcc56d62
authored
Apr 03, 2025
by
bnellnm
Committed by
GitHub
Apr 03, 2025
Browse files
[Bugfix] Fix function names in test_block_fp8.py (#16033)
Signed-off-by:
Bill Nell
<
bnell@redhat.com
>
parent
f15e70d9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
tests/kernels/test_block_fp8.py
tests/kernels/test_block_fp8.py
+5
-5
No files found.
tests/kernels/test_block_fp8.py
View file @
dcc56d62
...
@@ -360,7 +360,7 @@ def fp8_perm(m, idx):
...
@@ -360,7 +360,7 @@ def fp8_perm(m, idx):
return
m
[
idx
,
...]
return
m
[
idx
,
...]
def
test
_moe_permute
(
a
,
a_s
,
topk_ids
,
num_groups
,
topk
,
block_m
):
def
_moe_permute
(
a
,
a_s
,
topk_ids
,
num_groups
,
topk
,
block_m
):
M
,
K
=
a
.
shape
M
,
K
=
a
.
shape
sorted_token_ids
,
m_indices
,
num_pad
=
moe_align_block_size
(
sorted_token_ids
,
m_indices
,
num_pad
=
moe_align_block_size
(
...
@@ -379,7 +379,7 @@ def test_moe_permute(a, a_s, topk_ids, num_groups, topk, block_m):
...
@@ -379,7 +379,7 @@ def test_moe_permute(a, a_s, topk_ids, num_groups, topk, block_m):
return
a
,
a_s
,
m_indices
,
inv_perm
return
a
,
a_s
,
m_indices
,
inv_perm
def
test
_moe_unpermute
(
out
,
inv_perm
,
topk
,
K
,
topk_weight
):
def
_moe_unpermute
(
out
,
inv_perm
,
topk
,
K
,
topk_weight
):
M
=
topk_weight
.
shape
[
0
]
M
=
topk_weight
.
shape
[
0
]
out
=
out
[
inv_perm
,
...]
out
=
out
[
inv_perm
,
...]
tmp_out
=
out
.
view
(
-
1
,
topk
,
K
)
tmp_out
=
out
.
view
(
-
1
,
topk
,
K
)
...
@@ -401,8 +401,8 @@ def deep_gemm_w8a8_block_fp8_moe(M, K, a, w1, w2, w1_s, w2_s, score, topk,
...
@@ -401,8 +401,8 @@ def deep_gemm_w8a8_block_fp8_moe(M, K, a, w1, w2, w1_s, w2_s, score, topk,
a_q
,
a_s
=
per_token_group_quant_fp8
(
a
,
block_m
)
a_q
,
a_s
=
per_token_group_quant_fp8
(
a
,
block_m
)
a_q
,
a_s
,
m_indices
,
inv_perm
=
test
_moe_permute
(
a_q
,
a_s
,
topk_ids
,
a_q
,
a_s
,
m_indices
,
inv_perm
=
_moe_permute
(
a_q
,
a_s
,
topk_ids
,
num_groups
,
topk
,
block_m
)
num_groups
,
topk
,
block_m
)
inter_out
=
torch
.
zeros
((
a_q
.
shape
[
0
],
N
*
2
),
inter_out
=
torch
.
zeros
((
a_q
.
shape
[
0
],
N
*
2
),
dtype
=
torch
.
bfloat16
,
dtype
=
torch
.
bfloat16
,
...
@@ -419,7 +419,7 @@ def deep_gemm_w8a8_block_fp8_moe(M, K, a, w1, w2, w1_s, w2_s, score, topk,
...
@@ -419,7 +419,7 @@ def deep_gemm_w8a8_block_fp8_moe(M, K, a, w1, w2, w1_s, w2_s, score, topk,
deep_gemm
.
m_grouped_gemm_fp8_fp8_bf16_nt_contiguous
(
deep_gemm
.
m_grouped_gemm_fp8_fp8_bf16_nt_contiguous
(
(
act_out_q
,
act_out_s
),
(
w2
,
w2_s
),
out
,
m_indices
)
(
act_out_q
,
act_out_s
),
(
w2
,
w2_s
),
out
,
m_indices
)
final_out
=
test
_moe_unpermute
(
out
,
inv_perm
,
topk
,
K
,
topk_weight
)
final_out
=
_moe_unpermute
(
out
,
inv_perm
,
topk
,
K
,
topk_weight
)
return
final_out
return
final_out
...
...
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