gemini-code-assist[bot] commented on code in PR #100:
URL: https://github.com/apache/tvm-ffi/pull/100#discussion_r2422874123
##########
python/tvm_ffi/core.pyi:
##########
@@ -540,7 +540,7 @@ class Function(Object):
which is the function handle
keep_alive_object : object
- optional closure to be captured and kept alive
+ optional object to be captured and kept alive
Usually can be the execution engine that JITed the function
Review Comment:

To improve clarity and maintain consistency with the more detailed docstring
in `python/tvm_ffi/cython/function.pxi`, consider expanding the documentation
for `keep_alive_object`. A more descriptive explanation in the public API stub
would be beneficial for users.
```suggestion
optional object to be captured and kept alive.
Usually this can be the execution engine that JIT-compiled the
function
to ensure we keep the execution environment alive
as long as the function is alive.
```
##########
src/ffi/extra/testing.cc:
##########
@@ -180,6 +180,15 @@ int __add_one_c_symbol(void*, const TVMFFIAny* args,
int32_t num_args, TVMFFIAny
TVM_FFI_SAFE_CALL_END();
}
+void _mlir_add_one_c_symbol(void** packed_args) {
Review Comment:

To improve type safety and make the function's contract explicit, please add
the `noexcept` specifier to `_mlir_add_one_c_symbol`. The corresponding
function pointer in `TVMFFIPyMLIRPackedSafeCall` is already `noexcept`, and
since this function doesn't throw exceptions, this change will make the code
more robust and self-documenting.
```c
void _mlir_add_one_c_symbol(void** packed_args) noexcept {
```
--
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]