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
OpenDAS
FastMoE
Commits
a7975801
Commit
a7975801
authored
Aug 20, 2023
by
xptree
Browse files
fix cublas gemm call for bf16 input
parent
cd8372b3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
cuda/utils/cublas_wrapper.h
cuda/utils/cublas_wrapper.h
+6
-5
No files found.
cuda/utils/cublas_wrapper.h
View file @
a7975801
...
...
@@ -122,12 +122,13 @@ inline cublasStatus_t cublasXgemm(cublasHandle_t handle,
// TODO: Support bf16 for HIP
assert
(
false
);
#else
const
float
alpha_fp32
(
*
alpha
),
beta_fp32
(
*
beta
);
return
cublasSgemmEx
(
handle
,
transa
,
transb
,
m
,
n
,
k
,
(
const
float
*
)
alpha
,
(
const
void
*
)
A
,
CUDA_R_16F
,
lda
,
(
const
void
*
)
B
,
CUDA_R_16F
,
ldb
,
(
const
float
*
)
beta
,
(
void
*
)
C
,
CUDA_R_16F
,
ldc
);
(
const
float
*
)
&
alpha
_fp32
,
(
const
void
*
)
A
,
CUDA_R_16
B
F
,
lda
,
(
const
void
*
)
B
,
CUDA_R_16
B
F
,
ldb
,
(
const
float
*
)
&
beta
_fp32
,
(
void
*
)
C
,
CUDA_R_16
B
F
,
ldc
);
#endif
}
#endif // CUBLAS_WRAPPER_H
...
...
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