tqchen commented on a change in pull request #8120:
URL: https://github.com/apache/tvm/pull/8120#discussion_r638261079



##########
File path: src/parser/parser.cc
##########
@@ -524,12 +524,12 @@ class Parser {
   NDArray NumberToNDArray(const Token& token) {
     if (token->token_type == TokenType::kInteger) {
       DLDevice dev = {DLDeviceType::kDLCPU, 0};
-      auto dtype = String2DLDataType("int32");
+      auto dtype = String2DLDataType("int64");
       auto data = NDArray::Empty({}, dtype, dev);
-      auto array = reinterpret_cast<int32_t*>(data->data);
+      auto array = reinterpret_cast<int64_t*>(data->data);
       // revisit this, literal node issue.
       int64_t value = Downcast<tvm::Integer>(token->data);
-      array[0] = (int32_t)value;
+      array[0] = (int64_t)value;

Review comment:
       `static_cast<int64_t>`(always prefer c++ style cast)




-- 
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:
[email protected]


Reply via email to