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
TransformerEngine
Commits
c56646e4
Unverified
Commit
c56646e4
authored
Jun 26, 2023
by
Kirthi Shankar Sivamani
Committed by
GitHub
Jun 26, 2023
Browse files
Fix compute type for GEMM (#296)
Signed-off-by:
Kirthi Shankar Sivamani
<
ksivamani@nvidia.com
>
parent
574f1b41
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
transformer_engine/common/gemm/cublaslt_gemm.cu
transformer_engine/common/gemm/cublaslt_gemm.cu
+5
-4
No files found.
transformer_engine/common/gemm/cublaslt_gemm.cu
View file @
c56646e4
...
@@ -104,10 +104,11 @@ void cublas_gemm(const Tensor *inputA,
...
@@ -104,10 +104,11 @@ void cublas_gemm(const Tensor *inputA,
int64_t
ld_gelumat
=
(
int64_t
)
ldd
;
int64_t
ld_gelumat
=
(
int64_t
)
ldd
;
// default to tf32 except for e5m2 inputs where the config is not supported
// Use TF32 only for pure FP32 GEMM.
cublasComputeType_t
gemm_compute_type
=
(
A_type
==
CUDA_R_8F_E5M2
||
B_type
==
CUDA_R_8F_E5M2
)
cublasComputeType_t
gemm_compute_type
=
CUBLAS_COMPUTE_32F
;
?
CUBLAS_COMPUTE_32F
if
(
A_type
==
CUDA_R_32F
&&
B_type
==
CUDA_R_32F
&&
D_type
==
CUDA_R_32F
)
{
:
CUBLAS_COMPUTE_32F_FAST_TF32
;
gemm_compute_type
=
CUBLAS_COMPUTE_32F_FAST_TF32
;
}
// Create matrix descriptors. Not setting any extra attributes.
// Create matrix descriptors. Not setting any extra attributes.
NVTE_CHECK_CUBLAS
(
cublasLtMatrixLayoutCreate
(
&
Adesc
,
A_type
,
NVTE_CHECK_CUBLAS
(
cublasLtMatrixLayoutCreate
(
&
Adesc
,
A_type
,
...
...
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