Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upSingle Operator Execution Interface #4453
Conversation
The current design implements a new ExecutionFrame that is used to execute the op. This is less than optimal; I will attempt to change this in the future. The API will also have to be extended to add other providers than CPU.
With this change, the ExecutableKernelContextImpl is initalized at kernel creation, and not at compute time, which should remove some overhead. This allows multiple calls with different datato be made using the same kernel. Furthermore, the main graph of the different op kernels is now shared through OrtKernelSession.
* Reuse provides across Kernels * Support CUDA providers
microsoft-cla
bot
commented
Jul 8, 2020
•
|
This looks interesting to expose into the Java API, but is there a reason why the input and output arguments are specified separately from the call to compute? In session.run they are supplied to that call, and I feel like that maps a little more naturally. |
I'm not particularly tied to this exact API; if exposed to the Java or Python API, it could be implemented similarly to |
|
/azp run Linux CPU CI Pipeline,Linux CPU x64 NoContribops CI Pipeline,Linux GPU CI Pipeline,Linux GPU TensorRT CI Pipeline,MacOS CI Pipeline,MacOS NoContribops CI Pipeline,Windows CPU CI Pipeline,Windows GPU CI Pipeline,Windows GPU TensorRT CI Pipeline |
azure-pipelines
bot
commented
Aug 13, 2020
|
Pull request contains merge conflicts. |
|
/azp run orttraining-linux-ci-pipeline,orttraining-mac-ci-pipeline,orttraining-linux-gpu-ci-pipeline,centos7_cpu,Linux OpenVINO CI Pipeline |
azure-pipelines
bot
commented
Aug 13, 2020
|
Pull request contains merge conflicts. |
|
/azp run Windows GPU CI Pipeline, WIndows GPU TensorRT CI Pipeline, centos7_cpu, centos7_cpu (linux_centos_ci Debug), centos7_cpu (linux_centos_ci Release), orttraining-linux-ci-pipeline, orttraining-linux-gpu-ci-pipeline |
|
/azp run Linux CPU CI Pipeline, Linux CPU x64 NoContribops CI Pipeline, Linux GPU CI Pipeline, Linux GPU TensorRT CI Pipeline, Linux OpenVINO CI Pipeline, MacOS CI Pipeline, MacOS NoContribops CI Pipeline, Windows CPU CI Pipeline |
azure-pipelines
bot
commented
Aug 17, 2020
|
Azure Pipelines successfully started running 5 pipeline(s). |
azure-pipelines
bot
commented
Aug 17, 2020
|
Azure Pipelines successfully started running 8 pipeline(s). |
|
/azp run Windows GPU CI Pipeline, WIndows GPU TensorRT CI Pipeline, centos7_cpu, centos7_cpu (linux_centos_ci Debug), centos7_cpu (linux_centos_ci Release), orttraining-linux-ci-pipeline, orttraining-linux-gpu-ci-pipeline |
|
/azp run Linux CPU CI Pipeline, Linux CPU x64 NoContribops CI Pipeline, Linux GPU CI Pipeline, Linux GPU TensorRT CI Pipeline, Linux OpenVINO CI Pipeline, MacOS CI Pipeline, MacOS NoContribops CI Pipeline, Windows CPU CI Pipeline |
azure-pipelines
bot
commented
Aug 18, 2020
|
Azure Pipelines successfully started running 5 pipeline(s). |
azure-pipelines
bot
commented
Aug 18, 2020
|
Azure Pipelines successfully started running 8 pipeline(s). |
|
@orausch are you planning more updates? Let me know when the CIs are ready to be run. |
|
@faxu after the latest changes I believe that the PR should pass the CI (I managed to build it on Linux and Windows using |
|
/azp run Windows GPU CI Pipeline, WIndows GPU TensorRT CI Pipeline, centos7_cpu, centos7_cpu (linux_centos_ci Debug), centos7_cpu (linux_centos_ci Release), orttraining-linux-ci-pipeline, orttraining-linux-gpu-ci-pipeline |
|
/azp run Linux CPU CI Pipeline, Linux CPU x64 NoContribops CI Pipeline, Linux GPU CI Pipeline, Linux GPU TensorRT CI Pipeline, Linux OpenVINO CI Pipeline, MacOS CI Pipeline, MacOS NoContribops CI Pipeline, Windows CPU CI Pipeline |
azure-pipelines
bot
commented
Aug 26, 2020
|
Azure Pipelines successfully started running 5 pipeline(s). |
azure-pipelines
bot
commented
Aug 26, 2020
|
Azure Pipelines successfully started running 8 pipeline(s). |
|
This seems pretty useful. +@RyanUnderhill @pranavsharma |
|
Hi @jywu-msft / @orausch either we get traction on this PR or we close it. Can you please drive this to closure? it has been outstanding for a while. |
|
Thanks for following up @codemzs. I think a good next step would be to get a review in from someone on the ORT team. Let me know if there is any other way I can help drive this forward. |
|
@orausch I believe Pranav from ORT team will be looking at this. |
orausch commentedJul 8, 2020
•
edited
Description: This PR adds an interface to the C ABI that enables the execution of single ONNX nodes, without the overhead of graph construction and memory allocation
Motivation and Context
The alternative way to execute single operators/nodes is to create an ONNX graph containing a single node only. However, this (understandably) adds a lot of overhead, as can be seen in the plot below.
Here is an example of how the API can be used (UPDATE: new api for adding attributes):
It has been tested with the CPU and CUDA execution providers.