DarkSharpness commented on PR #228: URL: https://github.com/apache/tvm-ffi/pull/228#issuecomment-3570593750
Thanks @Ubospica . `std::pair` is very easy to integrate (just a special form of tuple). Supporting std::any, however, is much more complicated. For foreign objects we only have their `TVMFFIAny` representation and a corresponding `type_index`, but we do not know the actual C++ type information behind them. To support `std::any`, we would need to assign a default fallback C++ type for every possible `type_index`. This might be technically possible, but it definitely would require substantial additional logic and invasive changes. Given this, I would recommend using `tvm::ffi::Any` or `tvm::ffi::AnyView` instead. They integrate more naturally with the existing runtime and are generally more powerful than C++ `std::any`. -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
