gemini-code-assist[bot] commented on code in PR #18879:
URL: https://github.com/apache/tvm/pull/18879#discussion_r2893618109
##########
include/tvm/tir/op.h:
##########
@@ -735,11 +741,17 @@ TVM_DLL PrimExpr fast_erf_float_expr(PrimExpr arg, int
bits);
} \
}
+#define TVM_DECLARE_INTRIN_UNARY(OpName) \
+ inline PrimExpr OpName(PrimExpr x, Span span = Span()) { \
+ static const Op& op = Op::Get("tir." #OpName); \
+ return tir::Call(x.dtype(), op, {x}, span); \
+ }
Review Comment:

This new `TVM_DECLARE_INTRIN_UNARY` macro is a simplified version of the old
one, and it notably lacks the handling for `bfloat16` types. While this PR
correctly moves trigonometric functions to `TVM_DECLARE_FLOAT_INTRIN_UNARY`,
many other mathematical functions like `exp`, `log`, and `sqrt` are now using
this new simplified macro. This is a regression as it removes `bfloat16`
support for them.
These functions are generally floating-point operations and should probably
also use `TVM_DECLARE_FLOAT_INTRIN_UNARY` to retain `bfloat16` support and gain
the new floating-point type check. The integer-only operations like `popcount`
and `clz` are correctly using this new macro.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]