matx.runtime.container module¶
Runtime container structures.
- class matx.runtime.container.Array(seq=())[源代码]¶
基类:
ObjectArray container of MATX.
You do not need to create Array explicitly. Normally python list and tuple will be converted automatically to Array during tvm function call. You may get Array in return values of TVM function call.
- class matx.runtime.container.Map(seq=())[源代码]¶
基类:
ObjectMap container of MATX IR.
You do not need to create Map explicitly. Normally python dict will be converted automaticall to Map during tvm function call. You can use convert to create a dict[Object-> Object] into a Map
- matx.runtime.container.getitem_helper(obj, elem_getter, length, idx)[源代码]¶
Helper function to implement a pythonic getitem function.
- 参数:
obj (object) – The original object
elem_getter (function) – A simple function that takes index and return a single element.
length (int) – The size of the array
idx (int or slice) – The argument passed to getitem
- 返回:
result – The result of getitem
- 返回类型:
object