Add support for mixed precision in contraction scale and bilinear #973
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.
This PR restores the support for mixed precision in contraction scale and bilinear after it was reverted because of a conflict between CK and hipTensor.
This PR introduces support for mixed precision datatypes in the contraction operation.
It exposes a new template argument -
ComputeDataType
that is used to cast the data before computations.The combinations supported after the change:
This change also fixes a lot of bugs/issues I found in the reference contraction, profiler and tests:
type_convert
withconst
datatypes in reference contraction;check_err
for BF16 and F16 datatypes;Normally I would prepare a separate review for every issue fix, but since GitHub does not allow for dependent PRs, it would take ages to finally merge this change. That's why I decided to put it all in this single huuuge change (it's mostly huge since I'm adding a lot of new instances, fixes themselves are mostly 1-5 liners).