[DOCS] Document Python FFI conversion protocols#622
Conversation
There was a problem hiding this comment.
Code Review
This pull request adds comprehensive documentation for Python argument conversion protocols in TVM FFI, explaining how Python values are converted to the FFI Any calling convention and detailing various special protocol hooks (such as __tvm_ffi_object__, __tvm_ffi_value__, and __cuda_stream__). A review comment points out a misleading description in the documentation table for the __cuda_stream__(self) protocol, suggesting it should be corrected to clarify that it returns an integer stream pointer rather than a protocol object.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
3248f49 to
ed345f2
Compare
This documents the Python argument conversion protocols recognized when calling TVM-FFI functions.
Summary:
__tvm_ffi_*hooks and__cuda_stream__in a protocol table.Validation:
pre-commit run --files docs/guides/python_lang_guide.md docs/concepts/func_module.rstuv run --group docs sphinx-build -M html docs docs/_build