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
fengzch-das
nunchaku
Commits
0343f43e
Commit
0343f43e
authored
Nov 24, 2025
by
fengzch
Browse files
fix: asm fma.rn.bf16x2 is not support
parent
181f4e43
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
8 deletions
+9
-8
src/kernels/awq/dequantize.cuh
src/kernels/awq/dequantize.cuh
+9
-8
No files found.
src/kernels/awq/dequantize.cuh
View file @
0343f43e
...
@@ -120,12 +120,13 @@ __forceinline__ __device__ void dequantize_s4_to_fp16x2(__nv_bfloat162 const &so
...
@@ -120,12 +120,13 @@ __forceinline__ __device__ void dequantize_s4_to_fp16x2(__nv_bfloat162 const &so
static
constexpr
uint32_t
BF16_ONE
=
0x3F803F80
;
static
constexpr
uint32_t
BF16_ONE
=
0x3F803F80
;
// Finally, we construct the output numbers.
// Finally, we construct the output numbers.
// Convert elt_01
// // Convert elt_01
asm
volatile
(
"fma.rn.bf16x2 %0, %1, %2, %3;
\n
"
:
"=r"
(
h
[
0
])
:
"r"
(
h
[
0
]),
"r"
(
BF16_ONE
),
"r"
(
BF16_BIAS
));
// asm volatile("fma.rn.bf16x2 %0, %1, %2, %3;\n" : "=r"(h[0]) : "r"(h[0]), "r"(BF16_ONE), "r"(BF16_BIAS));
// Convert elt_23
// // Convert elt_23
asm
volatile
(
"fma.rn.bf16x2 %0, %1, %2, %3;
\n
"
:
"=r"
(
h
[
1
])
:
"r"
(
h
[
1
]),
"r"
(
BF16_ONE
),
"r"
(
BF16_BIAS
));
// asm volatile("fma.rn.bf16x2 %0, %1, %2, %3;\n" : "=r"(h[1]) : "r"(h[1]), "r"(BF16_ONE), "r"(BF16_BIAS));
// Convert elt_45
// // Convert elt_45
asm
volatile
(
"fma.rn.bf16x2 %0, %1, %2, %3;
\n
"
:
"=r"
(
h
[
2
])
:
"r"
(
h
[
2
]),
"r"
(
BF16_ONE
),
"r"
(
BF16_BIAS
));
// asm volatile("fma.rn.bf16x2 %0, %1, %2, %3;\n" : "=r"(h[2]) : "r"(h[2]), "r"(BF16_ONE), "r"(BF16_BIAS));
// Convert elt_67
// // Convert elt_67
asm
volatile
(
"fma.rn.bf16x2 %0, %1, %2, %3;
\n
"
:
"=r"
(
h
[
3
])
:
"r"
(
h
[
3
]),
"r"
(
BF16_ONE
),
"r"
(
BF16_BIAS
));
// asm volatile("fma.rn.bf16x2 %0, %1, %2, %3;\n" : "=r"(h[3]) : "r"(h[3]), "r"(BF16_ONE), "r"(BF16_BIAS));
printf
(
"%s: asm fma.rn.bf16x2 is not supported in HIP yet!
\n
"
,
__func__
);
}
}
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