Lunderberg commented on code in PR #15983:
URL: https://github.com/apache/tvm/pull/15983#discussion_r1377837705


##########
include/tvm/runtime/packed_func.h:
##########
@@ -549,25 +586,41 @@ class TVMPODValue_ {
     // the frontend while the API expects a float.
     if (type_code_ == kDLInt) {
       return static_cast<double>(value_.v_int64);
+    } else if (auto opt = ThroughObjectRef<double>()) {
+      return opt.value();
+    } else if (auto opt = ThroughObjectRef<int64_t>()) {
+      return opt.value();

Review Comment:
   Good catch.  It isn't strictly necessary in either case, due to C++'s 
implicit conversion of numeric types, but would be good to call attention to 
it.  Updated to use a `static_cast<double>` here.



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to