tvm_tirx.tirx.script.stack_make_dltensor

tvm_tirx.tirx.script.stack_make_dltensor#

tvm_tirx.tirx.script.stack_make_dltensor(data, shape, strides, ndim, arr_dtype, elem_offset, *, ty=None, loc=UNKNOWN_LOC)#

Allocate a Tensor(DLTensor) on stack, return the handle

Parameters:
  • data (Expr) – The data of array.

  • shape (Expr) – The shape of array.

  • strides (Expr) – The strides of array.

  • ndim (Expr) – The dimensions of array.

  • arr_dtype (Expr) – The data type of array.

  • elem_offse (Expr) – The element offset of array.

  • loc (Location)

Returns:

call (Expr) – The call expression.