[Contrib] Support fp16 input in cpu sort#8672
Merged
comaniac merged 5 commits intoapache:mainfrom Aug 7, 2021
Merged
Conversation
masahi
commented
Aug 6, 2021
comaniac
approved these changes
Aug 6, 2021
| def test_sort(): | ||
| def verify_sort(shape, axis, is_ascend, is_dyn=False): | ||
|
|
||
| def verify_sort(shape, axis, is_ascend, is_dyn=False, in_dtype="float32"): |
Contributor
There was a problem hiding this comment.
We could also do a small refactoring for this file:
- Use
@pytest.mark.parametrize("in_dtype", ["float32", "float16"])in each unit test. - Let pytest collect tests in the main function:
if __name__ == "__main__":
pytest.main([__file__])
Member
Author
There was a problem hiding this comment.
Wouldn't that make the testing time double? This file is fairly slow to test (more than 3 min according to https://ci.tlcpack.ai/job/tvm/job/main/1384/testReport/ctypes.tests.python.relay/test_op_level6/) and I don't think fp16 tests need to run as often as fp32.
Contributor
There was a problem hiding this comment.
Hmm that's a fair concern.
Contributor
|
Thanks @masahi |
mehrdadh
pushed a commit
to mehrdadh/tvm
that referenced
this pull request
Aug 11, 2021
ylc
pushed a commit
to ylc/tvm
that referenced
this pull request
Sep 29, 2021
ylc
pushed a commit
to ylc/tvm
that referenced
this pull request
Jan 13, 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.
A solution for the issue discussed in #8296 (comment)
With this change, PT Faster RCNN can be converted to fp16. Converting MaskRCNN requires support for ADT (tensor array) in the mixed precision pass.
@comaniac @AndrewZhaoLuo