Skip to content

[Bug] AttributeError: Module has no function 'get_input_name' #14098

@leoluopy

Description

@leoluopy

hi ,
i am runing the script here to generate micro tvm crt project from pytorch model:
https://tvm.apache.org/docs/how_to/work_with_microtvm/micro_pytorch.html#sphx-glr-how-to-work-with-microtvm-micro-pytorch-py

while it comes to :
aot_executor = tvm.runtime.executor.aot_executor.AotModule(session.create_aot_executor())

some thing went wrong. the log is at below:
[11:35:08] /home/leo/tvm/src/runtime/micro/micro_session.cc:377: remote: DumpMetadata:
[11:35:08] /home/leo/tvm/src/runtime/micro/micro_session.cc:377: remote: mod_name=tvmgen_default
[11:35:08] /home/leo/tvm/src/runtime/micro/micro_session.cc:377: remote: version=1
[11:35:08] /home/leo/tvm/src/runtime/micro/micro_session.cc:377: remote: num_inputs=1
[11:35:08] /home/leo/tvm/src/runtime/micro/micro_session.cc:377: remote: num_outputs=1
[11:35:08] /home/leo/tvm/src/runtime/micro/micro_session.cc:377: remote: num_workspace_pools=0
[11:35:08] /home/leo/tvm/src/runtime/micro/micro_session.cc:377: remote: num_constant_pools=0
[11:35:08] /home/leo/tvm/src/runtime/micro/micro_session.cc:377: remote: input[0]: input0
[11:35:08] /home/leo/tvm/src/runtime/micro/micro_session.cc:377: remote: output[0]: output0
[11:35:08] /home/leo/tvm/src/runtime/micro/micro_session.cc:377: remote: input allocate[0]: input0
[11:35:08] /home/leo/tvm/src/runtime/micro/micro_session.cc:377: remote: output allocate[0]: output0
Traceback (most recent call last):
File "/home/leo/tvm/expworkspace/torch2micro_tvm.py", line 124, in
aot_executor = tvm.runtime.executor.aot_executor.AotModule(session.create_aot_executor())
File "/home/leo/tvm/python/tvm/runtime/executor/aot_executor.py", line 70, in init
self._get_input_name = module["get_input_name"]
File "/home/leo/tvm/python/tvm/runtime/module.py", line 191, in getitem
return self.get_function(name)
File "/home/leo/tvm/python/tvm/runtime/module.py", line 175, in get_function
raise AttributeError("Module has no function '%s'" % name)
AttributeError: Module has no function 'get_input_name'

do anyone have some idea ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-triagePRs or issues that need to be investigated by maintainers to find the right assignees to address ittype: bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions