tqchen commented on code in PR #19908:
URL: https://github.com/apache/tvm/pull/19908#discussion_r3491253734
##########
src/relax/op/tensor/create.cc:
##########
@@ -179,8 +179,7 @@ Type InferTypeOnesLikeZerosLike(const Call& call, const
BlockBuilder& ctx) {
/* relax.ones & relax.ones_like */
Expr ones(Expr shape, DLDataType dtype) {
- TVM_FFI_ICHECK((dtype != DLDataType{kDLOpaqueHandle, 0, 0}))
- << "Ones op expects the input dtype not to be void";
+ TVM_FFI_ICHECK(!PrimType(dtype).IsVoid()) << "Ones op expects the input
dtype not to be void";
Review Comment:
we can simply drop is void check here for now
##########
src/relax/op/tensor/create.cc:
##########
@@ -217,8 +216,7 @@ TVM_REGISTER_OP("relax.ones_like")
/* relax.zeros & relax.zeros_like */
Expr zeros(Expr shape, DLDataType dtype) {
- TVM_FFI_ICHECK((dtype != DLDataType{kDLOpaqueHandle, 0, 0}))
- << "Zeros op expects the input dtype not to be void";
+ TVM_FFI_ICHECK(!PrimType(dtype).IsVoid()) << "Zeros op expects the input
dtype not to be void";
Review Comment:
we can simply drop is voidcheck hre for now
--
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]