Lunderberg opened a new pull request, #11973:
URL: https://github.com/apache/tvm/pull/11973

   If a compilation unit includes `<tvm/ir/expr.h>`, but does not include 
`<tvm/tir/op.h>`, the operator overloads for `ObjectRef` are declared, but the 
operator overloads for `PrimExpr` are not.  In this case, any use of `expr_a == 
expr_b` would use `ObjectRef`'s implementation and compare reference equality 
of the two expressions, rather than returning a `PrimExpr` that represents the 
comparison.  By having the operator overloads in the `<tvm/ir/expr.h>` header 
file, directly adjacent to the `PrimExpr` declaration, the correct overload 
must be available whenever the `PrimExpr` can be used.
   
   Even though this would only impact `operator==`, `operator!=`, and 
`operator<`, the three operators defined for `ObjectRef`, this PR moves all 
operator overloads to `expr.h` for consistency.
   
   The named version of the operators (e.g. `tvm::add`) do not have overloaded 
variants, and so they are intentionally kept in `<tvm/tir/op.h>`.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to