nan2088 commented on issue #357:
URL: https://github.com/apache/tvm-ffi/issues/357#issuecomment-3688409998

   I'd like to
   
   > [@nan2088](https://github.com/nan2088) Glad to learn your problem is 
solved!
   > 
   > Here's my recommendation if you are kind enough to submit a patch on:
   > 
   > 
[tvm-ffi/include/tvm/ffi/type_traits.h](https://github.com/apache/tvm-ffi/blob/0d8fec88eca5acaeaa7e771003d183c31711574a/include/tvm/ffi/type_traits.h#L281-L285)
   > 
   > Lines 281 to 285 in 
[0d8fec8](/apache/tvm-ffi/commit/0d8fec88eca5acaeaa7e771003d183c31711574a)
   > 
   >  TVM_FFI_INLINE static void CopyToAnyView(const Int& src, TVMFFIAny* 
result) { 
   >    result->type_index = TypeIndex::kTVMFFIInt; 
   >    result->zero_padding = 0; 
   >    result->v_int64 = static_cast<int64_t>(src); 
   >  } 
   > * Enable runtime range checks only for `uint64_t`, but not other types, 
because `uint64_t` is the only type that could overflow `int64_t` (uint32_t 
won't)
   > * No macro or option is necessary, because the check is only performed on 
`uint64_t` which is rare case
   
   I'd be happy to.


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

Reply via email to