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/01/29 05:00:40 UTC
[GitHub] [tvm] altanh commented on a change in pull request #7370: [Parser] Fix tokenizing inf
altanh commented on a change in pull request #7370:
URL: https://github.com/apache/tvm/pull/7370#discussion_r566579870
##########
File path: src/parser/tokenizer.h
##########
@@ -521,6 +521,12 @@ struct Tokenizer {
}
auto span = SpanFrom(line, col);
+
+ if (keyword == "inff") {
Review comment:
I just did some checking, and I think we might be able just call the `ParseNumber` method here by exploiting the fact that `stod("inf")` actually parses correctly as `inf` float literal. Can you try this? It might "just work" (assuming no platform-dependent weirdness with `stod`). With this we don't need to explicitly create an `inf` float ourselves.
----------------------------------------------------------------
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