You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2020/04/08 06:16:26 UTC
[GitHub] [incubator-tvm] zhiics edited a comment on issue #5276:
[REFACTOR][IR] Move to runtime::String
zhiics edited a comment on issue #5276: [REFACTOR][IR] Move to runtime::String
URL: https://github.com/apache/incubator-tvm/pull/5276#issuecomment-610771891
@tqchen One problem of replacing the default container StringImm with runtime String is that some of the IR nodes are using PrimExpr which could be both StringImm or IntImm (they are implicitly converted from std::string, integers, or floats). For example,
https://github.com/apache/incubator-tvm/blob/89da63e228eae2b0b4fe39770031a042858c52a7/include/tvm/tir/expr.h#L707
and
https://github.com/apache/incubator-tvm/blob/89da63e228eae2b0b4fe39770031a042858c52a7/include/tvm/tir/stmt.h#L147-L149
This would fail if we pass string and default it to runtime String, i.e.
https://github.com/apache/incubator-tvm/blob/89da63e228eae2b0b4fe39770031a042858c52a7/python/tvm/tir/expr.py#L977
Should we explicitly convert it from runtime String to StringImm in this case either before the constructor in Python or in the PackedFunc in the C++? This looks pretty ugly. Could you suggest some better solutions?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services