Now I try to assign param of the pre-trained model into the pipeline module,
I noticed the function of PipelineModule.set_input support such setting:
However, this function will induce the following error:
AttributeError: 'Module' object has no attribute 'set_input'
This is because of the type of self.graph_modules_[mod_idx] is something like Module(GraphExecutor, 27517208) instead of tvm.contrib.graph_executor.GraphModule. In this case, the latter can access set_input but the former cannot.
Is there any other way to assign parameters or can I transfer from Module(GraphExecutor, XXX) to tvm.contrib.graph_executor.GraphModule in this case to set the parameters?
Thanks for your help in advance and many thanks for developing this TVM function.
@popojames , thanks for trying the pipeline runtime, the set params issue will get address in our new patch, you also can try following change as a quick fix.
More info:
What I want to do is very similar to do what you have done in tvm/test_pipeline_executor.py at fba531e55f032367acc28090605c5533b2e88f55 · apache/tvm (github.com)
To be more specific, I tried to compare the correctness of the pipeline setting, in another word, if I feed the input to with pipeline and run the inference, I was expected to get the same result as I get in without the pipeline setting. Now I was able to achieve so.