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
c1c19f3e
Unverified
Commit
c1c19f3e
authored
Aug 21, 2023
by
Rick Ho
Committed by
GitHub
Aug 21, 2023
Browse files
Merge pull request #171 from laekov/xptree/fix-bf16
fix cublas gemm call for bf16 input
parents
cd8372b3
a7975801
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 @
c1c19f3e
...
...
@@ -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