According to this answar and the reference, the definition of size_t is implementation depended.
I added inline Expr make_const(Type t, size_t val) {return make_const(t, (uint64_t)val);}, and it works, while I don't think it's a solution, since some system may have size_t and uint64_t the same.
When compiling latest tvm, it failed on topi.cc.o
the return type of
buf->shape.size()
issize_t
, which seems different fromuint64_t
on my clang of Xcode.it's defined in stddef.h (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/9.0.0/include/stddef.h:54)
According to this answar and the reference, the definition of
size_t
is implementation depended.I added
inline Expr make_const(Type t, size_t val) {return make_const(t, (uint64_t)val);}
, and it works, while I don't think it's a solution, since some system may havesize_t
anduint64_t
the same.Why don't we use template here?