Function tvm::tirx::transform::MakePackedAPI

Function tvm::tirx::transform::MakePackedAPI#

Function Documentation#

Pass tvm::tirx::transform::MakePackedAPI()#

Transform the high-level Function to a low-level version that can be used as an API function.

The main task of this function is to create code to :

  • Map the values in the api_args to Var that is required by body.

  • Insert assertions to check type/value of the passed arguments.

let num_packed_args = len(api_args);

if num_packed_args is zero: f()

if num_packed_args is not zero: f(void , TVMFFIAny packed_args, int num_packed_args, api_arg_k, api_arg_k+1, … api_arg_n, TVMFFIAny* out_ret_val)

where n == len(api_args), k == num_packed_args

Note

The function signature have two cases

Returns:

The pass.