Remove BFloat16 Specialized Code for ReduceSum#10476
Merged
Merged
Conversation
ytaous
previously approved these changes
Feb 7, 2022
yuslepukhin
reviewed
Feb 7, 2022
|
|
||
| CudnnReduceDescriptor reduce_desc; | ||
| if (std::is_same<T, MLFloat16>::value) { | ||
| if (std::is_same<T, MLFloat16>::value || std::is_same<T, BFloat16>::value) { |
Member
Can we make it static_assert() for compile time error and make all specializations constexpr? Refers to: onnxruntime/core/providers/cuda/cudnn_common.cc:119 in 56a1a6f. [](commit_id = 56a1a6f, deletion_comment = False) |
Contributor
Author
To do this, we may need to move those code from cc file to h file? And it's better we do this for all structs/classes in cudnn_common.h and miopen_common.h, which is not related to this PR. Maybe in a new one? |
ytaous
approved these changes
Feb 8, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The BFloat16 speciailized code for ReduceSum is required when we used nv_bfloat16 as data type for calculation. Now we switch to BFloat16 type, this piece of code is no longer needed, we can use the default implementation for BFloat16 ReduceSum.