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 2021/06/14 18:38:32 UTC

[GitHub] [tvm] comaniac commented on a change in pull request #8254: [Target] Allow 'true' and 'false' strings in conversions to integer

comaniac commented on a change in pull request #8254:
URL: https://github.com/apache/tvm/pull/8254#discussion_r651186137



##########
File path: src/target/target.cc
##########
@@ -210,7 +210,14 @@ ObjectRef TargetInternal::ParseType(const std::string& str,
     // Parsing integer
     int v;
     if (!(is >> v)) {
-      throw Error(": Cannot parse into type \"Integer\" from string: " + str);
+      // Bool is a subclass of IntImm, so allow textual boolean values.

Review comment:
       It would be better to use `to_lower` to canonicalize the string.




-- 
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