Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Relay] Stop ToMixedPrecision when constant is out of dtype range #15461

Merged
merged 2 commits into from
Aug 3, 2023

Conversation

echuraev
Copy link
Contributor

@echuraev echuraev commented Aug 2, 2023

In some layers, e.g. Clip, we might have a compilation error in the case when operation takes on the input a constant which is out of target data type range.

To prevent such situation, a new method was introduced. It compares values of constant attributes with the range of the target data type. In case if the value is out of range, then float32 will be used.

cc: @AndrewZhaoLuo, @elvin-n

In some layers, e.g. Clip, we might have a compilation error in the
case when operation takes on the input a constant which is out of
target data type range.

To prevent such situation, a new method was introduced. It compares
values of constant attributes with the range of the target data type. In
case if the value is out of range then float32 will be used.
@tvm-bot
Copy link
Collaborator

tvm-bot commented Aug 2, 2023

Thanks for contributing to TVM! Please refer to the contributing guidelines https://tvm.apache.org/docs/contribute/ for useful information and tips. Please request code reviews from Reviewers by @-ing them in a comment.

Generated by tvm-bot

@echuraev echuraev merged commit 0e905aa into apache:main Aug 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants