Function TVMFFIDataTypeToString#
Defined in File c_api.h
Function Documentation#
-
int TVMFFIDataTypeToString(const DLDataType *dtype, TVMFFIAny *out)#
Convert a DLDataType to a string.
Note
out is a String object that needs to be freed by the caller via TVMFFIObjectDecRef. The content of string can be accessed via TVMFFIObjectGetByteArrayPtr.
Note
The input dtype is a pointer to the DLDataType to avoid ABI compatibility issues.
- Parameters:
dtype – The DLDataType to convert.
out – The output string.
- Returns:
0 on success, nonzero on failure.