File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -407,7 +407,16 @@ typedef int (*DLPackManagedTensorAllocator)( //
407407 *
408408 * \param py_object The Python object to convert; this should be PyObject*.
409409 * We use void* to avoid dependency on Python.h.
410+ *
411+ * \param max_version The maximum version of DLPack support that consumer supports.
412+ * Consumer should fill in their own version here, this parameter is not null.
413+ * Producer can use this information to produce the appropriate
414+ * DLManagedTensorVersioned for maximum compatibility if needed.
415+ * This field is primarily used for future compatibility in case
416+ * of major version bump and ABI-breaking changes.
417+ *
410418 * \param out The output DLManagedTensorVersioned.
419+ *
411420 * \param optional_out_env_stream Outputs the current context stream of the device provided
412421 * by the tensor; it can be NULL, in which case the stream will not be queried.
413422 * optional_out_env_stream should points to cudaStream_t in the case of CUDA.
@@ -420,6 +429,7 @@ typedef int (*DLPackManagedTensorAllocator)( //
420429 */
421430typedef int (*DLPackManagedTensorFromPyObject)( //
422431 void * py_object, //
432+ const DLPackVersion* max_version, //
423433 DLManagedTensorVersioned** out, //
424434 void ** optional_out_env_stream //
425435);
You can’t perform that action at this time.
0 commit comments