ONNX Runtime: cross-platform, high performance ML inferencing and training accelerator
Find a file
Jameson Miller 3e6b8d159a
Eager mode: implement resize_ operation (#12004)
Add support for PyTorch `resize_` operation. The PyTorch API method is documented
here:

https://pytorch.org/docs/stable/generated/torch.Tensor.resize_.html

Implementation notes:

There are some implementation details that might deviate from
expectations:

  - As the Onnxruntime::tensor does not support resize operation, this
    functionality is supported on the TensorImpl by swapping out the
    backing tensor if the size changes.

  - In the ORT model the shape of the TensorImpl is defined by the
    backing onnxruntime::tensor, so it is not supported to have a
    TensorImpl with a different shape / size than the backing
    onnxruntime::tensor. This means when resizing to a smaller TensorImpl,
    other implementations might keep the same backing storage, ORT will
    re-allocate a new onnxruntime::tensor and copy over as many of the
    existing elements that fit. Functionally, you will end up with same
    output, but the underlying buffer will be re-allocated.

    A future change could be to allow ORTTensorImpl to have a different
    size / shape than the onnxrutime::tensor backing it, and then we
    could improve this behavior.

 The canonical CPU / CUDA implementations in PyTorch repository:
     CPU: aten/src/ATen/native/Resize.cpp
     CUDA: aten/src/ATen/native/cuda/Resize.cpp
2022-06-30 22:14:37 -04:00
.config A new pipeline to replace the existing WindowsAI packaging pipeline (#10646) 2022-03-03 08:56:49 -08:00
.gdn Update compliance tasks in python packaging pipeline and fix some compile warnings (#8471) 2021-07-30 17:16:37 -07:00
.github [TVM] handshake mechanism for support of TVMso EP (#11437) 2022-06-29 14:57:18 +02:00
.pipelines Update DML 1.9 Nuget package to fix WindowsAI nuget pipeline build issue (#11934) 2022-06-21 15:55:51 -07:00
.vscode Add python static type checking in CI checks (#11518) 2022-05-16 13:26:56 -07:00
cgmanifests Update ONNX to 1.12 (#11924) 2022-06-21 17:19:52 -07:00
cmake [TVM] handshake mechanism for support of TVMso EP (#11437) 2022-06-29 14:57:18 +02:00
csharp Disable sequence-type tests since C# infra doesn't support well (#12037) 2022-06-30 09:49:03 -07:00
dockerfiles [EP-Perf] Install new wheel>=0.35.1 dependency (#11917) 2022-06-20 15:09:27 -07:00
docs [TVM] handshake mechanism for support of TVMso EP (#11437) 2022-06-29 14:57:18 +02:00
include/onnxruntime/core Generalize native op creation (#11539) 2022-06-27 21:12:15 -07:00
java Update protobuf-java to 3.20.1 (#10420) 2022-05-11 07:52:12 -07:00
js Bump electron from 13.6.6 to 15.5.5 in /js/web (#11884) 2022-06-28 15:50:44 -07:00
objectivec Format all python files under onnxruntime with black and isort (#11324) 2022-04-26 09:35:16 -07:00
onnxruntime Extend lifetime of KernelDef when creating a standalone op (#12057) 2022-06-30 17:38:59 -07:00
orttraining Eager mode: implement resize_ operation (#12004) 2022-06-30 22:14:37 -04:00
package/rpm Bump master version to 1.12 (#10797) 2022-03-28 12:30:11 -07:00
samples Format all python files under onnxruntime with black and isort (#11324) 2022-04-26 09:35:16 -07:00
tools Fix windows eager build break by pinning to torch version 1.11.0 (#12033) 2022-06-30 07:01:13 -04:00
winml Fix WinML Tests are still targetting deprecated (deleted) experimental signal op definitions (#12006) 2022-06-27 16:35:50 -07:00
.clang-format
.clang-tidy
.dockerignore
.flake8 Fix torch cpp ext build when CPU wheel is installed but GPU card is present (#11608) 2022-05-25 09:44:26 -04:00
.gitattributes
.gitignore Add python docstring linting in vscode settings (#11316) 2022-04-23 06:23:04 -07:00
.gitmodules [TensorRT EP] support TensorRT 8.4 (#11866) 2022-06-16 07:46:40 -07:00
build.amd64.1411.bat
build.bat
build.sh
CITATION.cff Fix CITATION.cff and add automatic validation of your citation metadata (#10478) 2022-04-13 10:03:52 -07:00
CODEOWNERS Update to use teams instead of individual GH handles (#11163) 2022-04-12 12:06:12 -07:00
CONTRIBUTING.md minor improvements to CONTRIBUTING doc (#11080) 2022-04-12 15:22:34 -07:00
lgtm.yml Add LGTM config for c++ and c# (#11365) 2022-04-27 10:51:40 -07:00
LICENSE
NuGet.config
ort.wprp
ORT_icon_for_light_bg.png Update nuget icon (#10672) 2022-03-01 09:11:03 -08:00
packages.config Update DML 1.9 Nuget package to fix WindowsAI nuget pipeline build issue (#11934) 2022-06-21 15:55:51 -07:00
pyproject.toml Add python static type checking in CI checks (#11518) 2022-05-16 13:26:56 -07:00
README.md Add OpenVINO Pipeline Status to README (#11299) 2022-04-21 15:59:50 -07:00
requirements-dev.txt Introduce parameterized as a dev dependency (#11364) 2022-04-26 17:24:39 -07:00
requirements-doc.txt
requirements-training.txt Add post-install command to build PyTorch CPP extensions from within onnxruntime package (#8027) 2021-06-28 18:11:58 -07:00
requirements.txt.in Add additional python requirements (#11522) 2022-05-20 16:16:18 -07:00
SECURITY.md Microsoft mandatory file (#11619) 2022-05-25 13:56:10 -07:00
setup.py UEP 4.1 release (#11834) 2022-06-17 14:49:04 -07:00
ThirdPartyNotices.txt add copyright (#9943) (#9970) 2021-12-08 14:34:53 -08:00
VERSION_NUMBER Bump master version to 1.12 (#10797) 2022-03-28 12:30:11 -07:00

ONNX Runtime is a cross-platform inference and training machine-learning accelerator.

ONNX Runtime inference can enable faster customer experiences and lower costs, supporting models from deep learning frameworks such as PyTorch and TensorFlow/Keras as well as classical machine learning libraries such as scikit-learn, LightGBM, XGBoost, etc. ONNX Runtime is compatible with different hardware, drivers, and operating systems, and provides optimal performance by leveraging hardware accelerators where applicable alongside graph optimizations and transforms. Learn more →

ONNX Runtime training can accelerate the model training time on multi-node NVIDIA GPUs for transformer models with a one-line addition for existing PyTorch training scripts. Learn more →

Get Started

General Information: onnxruntime.ai

Usage documention and tutorials: onnxruntime.ai/docs

Companion sample repositories:

Build Pipeline Status

System CPU GPU EPs
Windows Build Status Build Status Build Status
Linux Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Mac Build Status
Build Status
Android Build Status
iOS Build Status
WebAssembly Build Status

Data/Telemetry

Windows distributions of this project may collect usage data and send it to Microsoft to help improve our products and services. See the privacy statement for more details.

Contributions and Feedback

We welcome contributions! Please see the contribution guidelines.

For feature requests or bug reports, please file a GitHub Issue.

For general discussion or questions, please use GitHub Discussions.

Code of Conduct

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

License

This project is licensed under the MIT License.