[TVM EP] code refactor - #10655
[TVM EP] code refactor#10655
Conversation
83de210 to
53968a6
Compare
3f391b6 to
649e510
Compare
3e95891 to
26937eb
Compare
…oes not depend on TvmExecutionProvider
7c5fe78 to
cb22353
Compare
db9c0a9 to
ac70584
Compare
…tion from TVMRunner. connect TVMRunnerImpl to TVMRunner
ac70584 to
f7cf1fc
Compare
|
Hello Xavier Dupré (@xadupre)! Could you see and start CI? |
|
/azp run Linux CPU CI Pipeline, Linux CPU Minimal Build E2E CI Pipeline, Linux GPU CI Pipeline, Linux GPU TensorRT CI Pipeline, Linux Nuphar CI Pipeline, Linux OpenVINO CI Pipeline, MacOS CI Pipeline, ONNX Runtime Web CI Pipeline, onnxruntime-binary-size-checks-ci-pipeline |
|
/azp run Windows CPU CI Pipeline, Windows GPU CI Pipeline, Windows GPU TensorRT CI Pipeline, Windows WebAssembly CI Pipeline, orttraining-amd-gpu-ci-pipeline, orttraining-linux-ci-pipeline, orttraining-linux-gpu-ci-pipeline, orttraining-ortmodule-distributed, onnxruntime-python-checks-ci-pipeline |
|
Azure Pipelines successfully started running 9 pipeline(s). |
|
Azure Pipelines successfully started running 8 pipeline(s). |
|
Hello Xavier Dupré (@xadupre) could you restart |
|
/azp run Linux CPU CI Pipeline, Linux CPU Minimal Build E2E CI Pipeline, Linux GPU CI Pipeline, Linux GPU TensorRT CI Pipeline, Linux Nuphar CI Pipeline, Linux OpenVINO CI Pipeline, MacOS CI Pipeline, ONNX Runtime Web CI Pipeline, onnxruntime-binary-size-checks-ci-pipeline |
| auto TVMCompiler::operator()(const TvmEPOptions& options, | ||
| const TVMTensorShapes& input_shapes) -> ModulePtr { | ||
| if (mod_) { | ||
| return mod_; |
There was a problem hiding this comment.
done
| size_t pos = src.find( ch ); | ||
| size_t initialPos = 0; | ||
| while( pos != std::string::npos ) { | ||
| dst.push_back( src.substr( initialPos, pos - initialPos ) ); |
There was a problem hiding this comment.
done
| } | ||
|
|
||
| int TvmExecutionProvider::CreateStateFunc(ComputeContext* context, FunctionState* state) { | ||
| int TvmExecutionProvider::createStateFunc(ComputeContext* context, FunctionState* state) { |
There was a problem hiding this comment.
The first letter is lower, is it a private method?
There was a problem hiding this comment.
Yes, it is
| const std::shared_ptr<TvmModule>& mod, | ||
| const InputsInfoMap& inputs_info, | ||
| const std::vector<DLTensor>& output_tensors) { | ||
| runner_ = getTVMRunnerImpl(mod, options, inputs_info, output_tensors); |
There was a problem hiding this comment.
done
|
Hello Xavier Dupré (@xadupre)! I've tried to fix all indentations in TVM EP code, also TVM hash commit was updated. Do you have any other comments/remarks? |
|
It is ok. I'm running the test again. |
|
/azp run Windows GPU CI Pipeline, Windows GPU TensorRT CI Pipeline, Windows WebAssembly CI Pipeline, orttraining-amd-gpu-ci-pipeline, orttraining-linux-ci-pipeline, orttraining-linux-gpu-ci-pipeline, orttraining-ortmodule-distributed, onnxruntime-python-checks-ci-pipeline |
|
/azp run Linux CPU CI Pipeline, Linux CPU Minimal Build E2E CI Pipeline, Linux GPU CI Pipeline, Linux GPU TensorRT CI Pipeline, Linux Nuphar CI Pipeline, Linux OpenVINO CI Pipeline, MacOS CI Pipeline, ONNX Runtime Web CI Pipeline, onnxruntime-binary-size-checks-ci-pipeline |
|
Azure Pipelines successfully started running 7 pipeline(s). |
|
Azure Pipelines successfully started running 9 pipeline(s). |
|
Good morning Xavier Dupré (@xadupre)! Could you start Windows CPU CI pipelines? |
|
/azp run Windows CPU CI Pipeline |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
Hello Xavier Dupré (@xadupre). CI tests passed successfully |
|
/azp run Linux TVM CI Pipeline |
|
Hi Valery Chernov (@vvchernov), I think this PR may have broken Linux TVM CI Pipeline (see #10895). It is possible to look into it? |
|
Thanks Xavier Dupré (@xadupre), I'll see it |
|
It seems to break the TVM CI pipeline. Is it possible to revert it for now? Or have a quick fix .... |
* rename info to options for TVM EP * transfer options processing from TVMExecutionProvider to TVMEPOptions * transfer TVMRunner to separated files * implement TVMCompiler class * replace CompileFunc by TVMCompiler object. update TVMRunner. now it does not depend on TvmExecutionProvider * correct logging of TVM EP options * RunnerImpl, GERunnerImpl and VMRunnerImpl were implemented * add prepareComputeInfo method * remove update_output_shapes flag * embed all TVM EP dependences to tvm namespace. transfer model compilation from TVMRunner. connect TVMRunnerImpl to TVMRunner * refactor compileModel method * small cleaning * separate TVM EP options data store and processing * replace TvmTensorShape by InlinedVector with max_size 5 * correct indentation * update TVM hash Co-authored-by: Valery Chernov <valery.chernov@deelvin.com>
* rename info to options for TVM EP * transfer options processing from TVMExecutionProvider to TVMEPOptions * transfer TVMRunner to separated files * implement TVMCompiler class * replace CompileFunc by TVMCompiler object. update TVMRunner. now it does not depend on TvmExecutionProvider * correct logging of TVM EP options * RunnerImpl, GERunnerImpl and VMRunnerImpl were implemented * add prepareComputeInfo method * remove update_output_shapes flag * embed all TVM EP dependences to tvm namespace. transfer model compilation from TVMRunner. connect TVMRunnerImpl to TVMRunner * refactor compileModel method * small cleaning * separate TVM EP options data store and processing * replace TvmTensorShape by InlinedVector with max_size 5 * correct indentation * update TVM hash Co-authored-by: Valery Chernov <valery.chernov@deelvin.com>
* rename info to options for TVM EP * transfer options processing from TVMExecutionProvider to TVMEPOptions * transfer TVMRunner to separated files * implement TVMCompiler class * replace CompileFunc by TVMCompiler object. update TVMRunner. now it does not depend on TvmExecutionProvider * correct logging of TVM EP options * RunnerImpl, GERunnerImpl and VMRunnerImpl were implemented * add prepareComputeInfo method * remove update_output_shapes flag * embed all TVM EP dependences to tvm namespace. transfer model compilation from TVMRunner. connect TVMRunnerImpl to TVMRunner * refactor compileModel method * small cleaning * separate TVM EP options data store and processing * replace TvmTensorShape by InlinedVector with max_size 5 * correct indentation * update TVM hash Co-authored-by: Valery Chernov <valery.chernov@deelvin.com> (cherry picked from commit 625a1f7)
* rename info to options for TVM EP * transfer options processing from TVMExecutionProvider to TVMEPOptions * transfer TVMRunner to separated files * implement TVMCompiler class * replace CompileFunc by TVMCompiler object. update TVMRunner. now it does not depend on TvmExecutionProvider * correct logging of TVM EP options * RunnerImpl, GERunnerImpl and VMRunnerImpl were implemented * add prepareComputeInfo method * remove update_output_shapes flag * embed all TVM EP dependences to tvm namespace. transfer model compilation from TVMRunner. connect TVMRunnerImpl to TVMRunner * refactor compileModel method * small cleaning * separate TVM EP options data store and processing * replace TvmTensorShape by InlinedVector with max_size 5 * correct indentation * update TVM hash Co-authored-by: Valery Chernov <valery.chernov@deelvin.com> (cherry picked from commit 625a1f7)
* rename info to options for TVM EP * transfer options processing from TVMExecutionProvider to TVMEPOptions * transfer TVMRunner to separated files * implement TVMCompiler class * replace CompileFunc by TVMCompiler object. update TVMRunner. now it does not depend on TvmExecutionProvider * correct logging of TVM EP options * RunnerImpl, GERunnerImpl and VMRunnerImpl were implemented * add prepareComputeInfo method * remove update_output_shapes flag * embed all TVM EP dependences to tvm namespace. transfer model compilation from TVMRunner. connect TVMRunnerImpl to TVMRunner * refactor compileModel method * small cleaning * separate TVM EP options data store and processing * replace TvmTensorShape by InlinedVector with max_size 5 * correct indentation * update TVM hash Co-authored-by: Valery Chernov <valery.chernov@deelvin.com> (cherry picked from commit 625a1f7)
* rename info to options for TVM EP * transfer options processing from TVMExecutionProvider to TVMEPOptions * transfer TVMRunner to separated files * implement TVMCompiler class * replace CompileFunc by TVMCompiler object. update TVMRunner. now it does not depend on TvmExecutionProvider * correct logging of TVM EP options * RunnerImpl, GERunnerImpl and VMRunnerImpl were implemented * add prepareComputeInfo method * remove update_output_shapes flag * embed all TVM EP dependences to tvm namespace. transfer model compilation from TVMRunner. connect TVMRunnerImpl to TVMRunner * refactor compileModel method * small cleaning * separate TVM EP options data store and processing * replace TvmTensorShape by InlinedVector with max_size 5 * correct indentation * update TVM hash Co-authored-by: Valery Chernov <valery.chernov@deelvin.com> (cherry picked from commit 625a1f7)
The main idea of the patch is to clean code of TVM EP for simplification of further development:
Alone functionality added is that each fused node has own compiler, earlier there is only one compiler. It should correctly support the mechanism of the responsibility pass between EPs.