Instead, !=, &&, and || should be used.
I tried adding user_asserts for type.bits() > 1, however that breaks the Python bindings as they rely on & and | instead of and and or (as it seems you cannot overload and and or in Python).
I ran into this issue because I had used a ^ on a bool arguments (uint1) which caused the WebGPU backend to complain that ^ is only valid on int datatypes, which is correct. This made me realize I should have used !=. So, trying to prevent bugs like this in the future, I added asserts (like mentioned before) in IROperator.cpp on all those bitwise operators to make sure you're not using them on booleans. However, that breaks the Python bindings as described.
Instead,
!=,&&, and||should be used.I tried adding user_asserts for
type.bits() > 1, however that breaks the Python bindings as they rely on&and|instead ofandandor(as it seems you cannot overloadandandorin Python).I ran into this issue because I had used a
^on a bool arguments (uint1) which caused the WebGPU backend to complain that^is only valid on int datatypes, which is correct. This made me realize I should have used!=. So, trying to prevent bugs like this in the future, I added asserts (like mentioned before) in IROperator.cpp on all those bitwise operators to make sure you're not using them on booleans. However, that breaks the Python bindings as described.