matx.runtime.container module¶
Runtime container structures.
- class matx.runtime.container.Array(seq=())[source]¶
Bases:
Object
Array 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=())[source]¶
Bases:
Object
Map 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)[source]¶
Helper function to implement a pythonic getitem function.
- Parameters:
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
- Returns:
result – The result of getitem
- Return type:
object