Skip to content

Conversation

@hope51607
Copy link
Contributor

I encountered the same max / min ambiguous issue caused by the ternary operator as #2821 and #5090.

The reason is that the type of the ternary operator is not unchar.

The patch that fixes this problem seems to be missing in #5107 .
This pr simply adds them back.

Copy link

@shingjan shingjan left a comment

Choose a reason for hiding this comment

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

Thanks for the work! I happened to notice that the test introduced in #5090 is disabled now. Can you confirm that this test passes with this PR? @kazum It would be great if you could take a look as well!

cc: @tqchen @junrushao1994

@masahi
Copy link
Member

masahi commented Oct 26, 2021

@hope51607 Can you also add fp16 tests? I've met the "type ambiguity" error when trying to compile fp16 models for opencl before. I assume this patch fixes such issue?

@masahi masahi self-assigned this Oct 26, 2021
@hope51607
Copy link
Contributor Author

@shingjan I have enabled these tests and confirmed that they passed.
@masahi I tried to add fp16 test, but in my environment it does not seem to support half-precision floating point.
I am confused whether to add it.

Copy link
Member

@masahi masahi left a comment

Choose a reason for hiding this comment

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

Sure, no problem.

@masahi masahi merged commit 37a8d7b into apache:main Oct 27, 2021
ylc pushed a commit to ylc/tvm that referenced this pull request Jan 7, 2022
* [BugFix][Opencl] Explicitly cast min/max operands

* enable test_opencl_max
ylc pushed a commit to ylc/tvm that referenced this pull request Jan 13, 2022
* [BugFix][Opencl] Explicitly cast min/max operands

* enable test_opencl_max
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