Replies: 2 comments
-
This sounds like a bug to me. Opened #6820 for tracking. Thanks for pointing this out! |
Beta Was this translation helpful? Give feedback.
0 replies
-
The short answer is:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi all.
In Halide 14.0.0, the behavior of calculation about “bool” is very weird.
We have
Func0(x,y)
as type bool and tried:We get error return is:
But when we tried:
They all works well.
So, we would like to know why was that? Shouldn’t their behavior have some kind of consistency?
And the output type of “bool” calculation is also very weird, could anyone give the regular pattern?
We have equation as below:
Func3(x,y) = pow(Func2(x, y), Func1(x, y));
Here,
If Func2 is float16 and Func1 is bool, Func3 will be float16.
If Func2 is bool and Func1 is float16, Func3 will be float32.
If Func2 is bool and Func1 is int16, Func3 will be float32.
If Func2 is int16 and Func1 is bool, Func3 will be float32.
And the most weird is that if Func2 is bool and Func1 is bool, Func3 will be float32.
Simply saying , we get:
And we consider one input is scalar, if the expr is
and set Func1 to bool, we get Func3 is float32.
But if the expr is
and Func1 is bool , we get Func3 is bool.
And also if the expr is
setting Func1 is bool and Func2 is int16, we get Func3 is fp32.
Simply, we get:
The inference of bool type calculation is so untellable which make us have to test before using. What rule about them? Or is it possible to make them more straightforward?
Looking forward for your reply, best wishes!
Beta Was this translation helpful? Give feedback.
All reactions