[Relay] Support i16, f16 scalars in Relay text#11224
Merged
Mousius merged 7 commits intoapache:mainfrom May 19, 2022
Merged
Conversation
d58d5f1 to
c655b0f
Compare
Mousius
requested changes
May 10, 2022
Member
Mousius
left a comment
There was a problem hiding this comment.
I think this is generally an improvement, but I'm curious whether we could cover more of the error scenarios in test cases? There's three different diagnostic errors for both int and float plus the clipping errors - though I'm unsure how easy it is to trigger them with current testing infrastructure.
While testing fp16 models for Collage discovered the Relay text
format did not support f16. While adding that cleaned up scalar handling
in general. However I left two inlined tests for 'is simple const'
in place (fuse_ops.cc and memory_alloc.cc) since it's not clear whether
they should remain specific to just {i,f}{32,64} or whether they can
be replaced with the support::IsSimpleScalar central predicate.
Contributor
Author
|
Thanks @Mousius (and sorry for the delay, been off an a separate adventure). I think the range checking testing is ok, and I added range checks for fp16 too. For the LOG(FATALS) I added cc tests since it's tricky to tickle the failures via python. PTAL. |
088671f to
86d3434
Compare
Mousius
approved these changes
May 19, 2022
Member
|
Thanks @mbs-octoml 😸 nice clean up! |
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.
While testing fp16 models for Collage discovered the Relay text
format did not support f16. While adding that cleaned up scalar handling
in general. However I left two inlined tests for 'is simple const'
in place (fuse_ops.cc and memory_alloc.cc) since it's not clear whether
they should remain specific to just {i,f}{32,64} or whether they can
be replaced with the support::IsSimpleScalar central predicate.
Also include spans in pretty printed form since I've started populating
them when debugging Collage.