Skip to content

Conversation

@AndrewZhaoLuo
Copy link
Contributor

IsMixedPrecisionType returns whether the given type matches the target mixed precision type if the type is a floating point type. If it is not a floating point type and the corresponding flag is set it just returns true.

This was the intended behavior. Previously this was not the case. This PR fixes things to match intended behavior.

Motivation is an op with a mix of arguments consisting of floating point and integers would never be allowed to be done in FP16 space unless the integer tensors were also constants.

Copy link
Contributor

@comaniac comaniac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@masahi masahi merged commit 9258997 into apache:main Jan 7, 2022
ylc pushed a commit to ylc/tvm that referenced this pull request Feb 16, 2022
* fix ismixedprecisiontype

* fix test

* jostle

* Update tests/python/relay/test_to_mixed_precision.py

Co-authored-by: Cody Yu <[email protected]>

Co-authored-by: Cody Yu <[email protected]>
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