From 8c54baf2b18f5780c0a88fd0bcbae556cefa24c0 Mon Sep 17 00:00:00 2001 From: Caroline Date: Mon, 22 May 2023 12:01:20 -0400 Subject: [PATCH] add ORT Training on the edge installation options (#15789) --- index.html | 68 ++++++++++++++++++++++++++---- js/script.js | 116 +++++++++++++++++++++++++++++++++++++++++++++------ 2 files changed, 163 insertions(+), 21 deletions(-) diff --git a/index.html b/index.html index 803a56ae4d..6bedab222c 100644 --- a/index.html +++ b/index.html @@ -559,21 +559,53 @@ Console.WriteLine(outputs[0].AsTensor()[0]); aria-hidden="true">
+ +
+
+

Scenario

+

+ Scenario list contains two items +

+
+
+
+
+ Large Model Training +
+
+ On-Device Training +
+
+
+
+

Platform

- Platform list contains one item + Platform list contains three items

-
Linux
+
+ Windows +
+
+ Android +
@@ -582,16 +614,32 @@ Console.WriteLine(outputs[0].AsTensor()[0]);

API

- API list contains one item + API list contains five items

-
- ORTModule for Pytorch +
+ Python +
+
+ C +
+
+ C++ +
+
+ C# +
+
+ Java
@@ -603,14 +651,14 @@ Console.WriteLine(outputs[0].AsTensor()[0]); Hardware Acceleration

- Hardware Acceleration list contains two items + Hardware Acceleration list contains three items

-
CUDA
@@ -618,6 +666,10 @@ Console.WriteLine(outputs[0].AsTensor()[0]); aria-selected="false" id="ot_ROCm"> ROCm
+
+ CPU +
diff --git a/js/script.js b/js/script.js index 3d397a83c6..26a1c4a257 100644 --- a/js/script.js +++ b/js/script.js @@ -19,10 +19,11 @@ var opts = { }; var ot_opts = { // os: getAnchorSelectedOS() || getDefaultSelectedOS(), - ot_os: 'ot_linux', + ot_scenario: '', + ot_os: '', ot_architecture: 'ot_X64', - ot_language: 'ot_ORTModule', - ot_hardwareAcceleration: 'ot_CUDA', + ot_language: '', + ot_hardwareAcceleration: '', }; var os = $(".os > .r-option"); @@ -34,6 +35,7 @@ var hardwareAcceleration = $(".hardwareAcceleration > .r-option"); var ot_os = $(".ot_os > .r-option"); var ot_tab = $('#OT_tab'); +var ot_scenario = $(".ot_scenario > .r-option"); var ot_architecture = $(".ot_architecture > .r-option"); var ot_language = $(".ot_language > .r-option"); var ot_hardwareAcceleration = $(".ot_hardwareAcceleration > .r-option"); @@ -73,6 +75,14 @@ ot_tab.on("click", function() { ot_commandMessage(ot_buildMatcher()); ot_checkValidity(); }); +ot_scenario.on("click", function () { + ot_selectedOption(ot_scenario, this, "ot_scenario"); +}); +ot_scenario.on("keypress keyup", function (event) { + if (checkKeyPress(event)) { + ot_selectedOption(ot_scenario, this, "ot_scenario"); + } +}); architecture.on("click", function () { selectedOption(architecture, this, "architecture"); }); @@ -267,6 +277,7 @@ function checkValidity(){ function ot_checkValidity(){ var current_os = ot_opts['ot_os']; + var current_scenario = ot_opts['ot_scenario']; var current_lang = ot_opts['ot_language']; var current_arch = ot_opts['ot_architecture']; var current_hw = ot_opts['ot_hardwareAcceleration']; @@ -279,6 +290,25 @@ function ot_checkValidity(){ var valid = Object.getOwnPropertyNames(ot_validCombos); + // scenario section + for(var i =0; i<cu_version*>.html
pip install torch-ort
python -m torch_ort.configure

*Available versions", - "ot_linux,ot_ORTModule,ot_X64,ot_ROCm": - "pip install onnxruntime-training -f https://downloads.onnxruntime.ai/onnxruntime_stable_<rocm_version*>.html
pip install torch-ort
python -m torch_ort.configure

*Available versions" + "ot_linux,ot_large_model,ot_python,ot_X64,ot_ROCm": + "pip install onnxruntime-training -f https://downloads.onnxruntime.ai/onnxruntime_stable_<rocm_version*>.html
pip install torch-ort
python -m torch_ort.configure

*Available versions", + "ot_linux,ot_on_device,ot_python,ot_X64,ot_CPU": + "pip install onnxruntime-training -f https://downloads.onnxruntime.ai/onnxruntime_stable_<cu_version*>.html

*Available versions", + + "ot_linux,ot_on_device,ot_python,ot_X64,ot_CUDA": + "Follow build instructions from here", + + "ot_windows,ot_on_device,ot_python,ot_X64,ot_CPU": + "Follow build instructions from here", + + "ot_windows,ot_on_device,ot_python,ot_X64,ot_CUDA": + "Follow build instructions from here", + + "ot_windows,ot_on_device,ot_c,ot_X64,ot_CPU": + "Install Nuget package Microsoft.ML.OnnxRuntime.Training", + + "ot_windows,ot_on_device,ot_cplusplus,ot_X64,ot_CPU": + "Install Nuget package Microsoft.ML.OnnxRuntime.Training", + + "ot_windows,ot_on_device,ot_csharp,ot_X64,ot_CPU": + "Install Nuget package Microsoft.ML.OnnxRuntime.Training", + + "ot_linux,ot_on_device,ot_c,ot_X64,ot_CPU": + "Download .tgz file from Github
Refer to docs for requirements.", + + "ot_linux,ot_on_device,ot_cplusplus,ot_X64,ot_CPU": + "Download .tgz file from Github
Refer to docs for requirements.", + + "ot_linux,ot_on_device,ot_csharp,ot_X64,ot_CPU": + "Install Nuget package Microsoft.ML.OnnxRuntime.Training", + + "ot_linux,ot_on_device,ot_c,ot_X64,ot_CUDA": + "Follow build instructions from here", + + "ot_linux,ot_on_device,ot_cplusplus,ot_X64,ot_CUDA": + "Follow build instructions from here", + + "ot_linux,ot_on_device,ot_csharp,ot_X64,ot_CUDA": + "Follow build instructions from here", + + "ot_windows,ot_on_device,ot_c,ot_X64,ot_CUDA": + "Follow build instructions from here", + + "ot_windows,ot_on_device,ot_cplusplus,ot_X64,ot_CUDA": + "Follow build instructions from here", + + "ot_windows,ot_on_device,ot_csharp,ot_X64,ot_CUDA": + "Follow build instructions from here", + + "ot_android,ot_on_device,ot_c,ot_X64,ot_CPU": + "Follow installation instructions from here", + + "ot_android,ot_on_device,ot_cplusplus,ot_X64,ot_CPU": + "Follow installation instructions from here", + + "ot_android,ot_on_device,ot_java,ot_X64,ot_CPU": + "Add a dependency on com.microsoft.onnxruntime:onnxruntime-training-android using Maven/Gradle and refer to the instructions here.", }; function ot_commandMessage(key) { $("#ot_command").removeClass("valid"); $("#ot_command").removeClass("invalid"); - if(ot_opts['ot_os']=='' || ot_opts['ot_architecture'] == '' || ot_opts['ot_language']=='' || ot_opts['ot_hardwareAcceleration'] == ''){ + if(ot_opts['ot_os']=='' || ot_opts['ot_scenario'] == '' || ot_opts['ot_architecture'] == '' || ot_opts['ot_language']=='' || ot_opts['ot_hardwareAcceleration'] == ''){ // console.log(ot_opts); $("#ot_command span").html( "Please select a combination of resources"