Hello everyone,

I was wondering if there is a way to pass a tuple (or array) directly to a 
packed func.

```
tpl = tuple(1,2,3)
tvm.tir.call_packed("func_name", tpl)
``` 

Reading the [packed_func 
documentation](https://tvm.apache.org/docs/dev/runtime.html?highlight=packed_func#packedfunc),
 I don't see a specific mention of a tuple being a valid input argument type.
Nonetheless, it states that "TVM Object to represent any object in IR" would be 
allowed.

I found that there is a 
[`tir.tvm_tuple`](https://tvm.apache.org/docs/api/doxygen/namespacetvm_1_1tir_1_1builtin.html#ab424ca353ceedd88a95fc37eeb9628a9),
 but when I try to use it from a python script I get the following error:
```
AttributeError: module 'tvm.tir' has no attribute 'tvm_tuple'
``` 

In the codebase, I only see 2 python examples of the `tvm_tuple` being used.
1. [In the TIR transform pipeline of 
VTA](https://github.com/apache/tvm/blob/main/vta/python/vta/transform.py#L780). 
But its being called inside a tvm.call_intrinsic.
2. [In a testing 
script](https://github.com/apache/tvm/blob/main/tests/python/unittest/test_tvmscript_roundtrip.py#L6939).
 But here it is being used inside of hybrid script, which for some reason 
doesnt throw the error. (Actually if I set a breakpoint there, I cant stop the 
execution there)


Thanks





---
[Visit 
Topic](https://discuss.tvm.apache.org/t/passing-a-tuple-to-a-packed-func/9117/1)
 to respond.

You are receiving this because you enabled mailing list mode.

To unsubscribe from these emails, [click 
here](https://discuss.tvm.apache.org/email/unsubscribe/208d0f889c36c40aeedac515caef3c0e6f47956e567cda63140fb3551e396adc).

Reply via email to