Lunderberg commented on code in PR #16183:
URL: https://github.com/apache/tvm/pull/16183#discussion_r1409843485
##########
include/tvm/runtime/packed_func.h:
##########
@@ -627,13 +645,54 @@ class TVMPODValue_ {
template <typename TObjectRef>
inline TObjectRef AsObjectRef() const;
+ std::optional<int64_t> TryAsInt() const {
+ // Helper function to reduce duplication in the variable integer
+ // conversions. This is publicly exposed, as it can be useful in
+ // specializations of PackedFuncValueConverter.
+ if (auto opt = FromBoxed<int64_t>()) {
Review Comment:
Ah, I had missed the context when reading the comment at the bottom. I
agree, these conversions when moving out of a `TVMPodValue_` should already
have been handled when moving into the value. I'm testing to verify that they
are no longer needed, and will then remove these checks.
--
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]