Function tvm::function::ffi::TVMBackendAllocWorkspace [−][src]
pub unsafe extern "C" fn TVMBackendAllocWorkspace(
device_type: i32,
device_id: i32,
nbytes: u64,
dtype_code_hint: i32,
dtype_bits_hint: i32
) -> *mut c_void
Expand description
\brief Backend function to allocate temporal workspace.
\note The result allocated space is ensured to be aligned to kTempAllocaAlignment.
\param nbytes The size of the space requested. \param device_type The device type which the space will be allocated. \param device_id The device id which the space will be allocated. \param dtype_code_hint The type code of the array elements. Only used in certain backends such as OpenGL. \param dtype_bits_hint The type bits of the array elements. Only used in certain backends such as OpenGL. \return nullptr when error is thrown, a valid ptr if success