diff --git a/examples/c/README.md b/examples/c/README.md index 486bbc62c..ec2e95a55 100644 --- a/examples/c/README.md +++ b/examples/c/README.md @@ -1,5 +1,7 @@ # ONNX Runtime GenAI C Example +Note: ONNX Runtime GenAI needs to be built from source. The headers and shared libraries that are built need to be copied over to the appropriate folders (i.e. the `include` and `lib` folders). Building from source is necessary because these examples have been updated to run with the latest changes. Once the next version of ONNX Runtime GenAI is released, the below instructions will be accurate again. + ## Setup Clone this repo and change into the `examples/c` folder. @@ -38,7 +40,7 @@ Change into the `onnxruntime-genai\examples\c` folder. ```cmd curl -L https://github.com/microsoft/onnxruntime/releases/download/v1.20.1/onnxruntime-win-x64-1.20.1.zip -o onnxruntime-win-x64-1.20.1.zip - tar xvf onnxruntime-win-x64-1.20.1.zip + tar -xvf onnxruntime-win-x64-1.20.1.zip copy onnxruntime-win-x64-1.20.1\include\* include copy onnxruntime-win-x64-1.20.1\lib\* lib ``` @@ -46,12 +48,12 @@ Change into the `onnxruntime-genai\examples\c` folder. 2. Install onnxruntime-genai ```cmd - curl -L https://github.com/microsoft/onnxruntime-genai/releases/download/v0.5.2/onnxruntime-genai-win-cpu-x64-capi.zip -o onnxruntime-genai-win-cpu-x64-capi.zip - tar xvf onnxruntime-genai-win-cpu-x64-capi.zip + curl -L https://github.com/microsoft/onnxruntime-genai/releases/download/v0.6.0/onnxruntime-genai-win-cpu-x64-capi.zip -o onnxruntime-genai-win-cpu-x64-capi.zip + tar -xvf onnxruntime-genai-win-cpu-x64-capi.zip cd onnxruntime-genai-win-cpu-x64-capi - tar xvf onnxruntime-genai-0.5.2-win-x64.zip - copy onnxruntime-genai-0.5.2-win-x64\include\* ..\include - copy onnxruntime-genai-0.5.2-win-x64\lib\* ..\lib + tar -xvf onnxruntime-genai-0.6.0-win-x64.zip + copy onnxruntime-genai-0.6.0-win-x64\include\* ..\include + copy onnxruntime-genai-0.6.0-win-x64\lib\* ..\lib cd .. ``` @@ -82,7 +84,7 @@ Change into the `onnxruntime-genai\examples\c` folder. mkdir onnxruntime-win-x64-directml cd onnxruntime-win-x64-directml curl -L https://github.com/microsoft/onnxruntime/releases/download/v1.20.1/Microsoft.ML.OnnxRuntime.DirectML.1.20.1.nupkg -o Microsoft.ML.OnnxRuntime.DirectML.1.20.1.nupkg - tar xvf Microsoft.ML.OnnxRuntime.DirectML.1.20.1.nupkg + tar -xvf Microsoft.ML.OnnxRuntime.DirectML.1.20.1.nupkg copy build\native\include\* ..\include copy runtimes\win-x64\native\* ..\lib cd .. @@ -91,12 +93,12 @@ Change into the `onnxruntime-genai\examples\c` folder. 2. Install onnxruntime-genai ```cmd - curl -L https://github.com/microsoft/onnxruntime-genai/releases/download/v0.5.2/onnxruntime-genai-win-directml-x64-capi.zip -o onnxruntime-genai-win-directml-x64-capi.zip - tar xvf onnxruntime-genai-win-directml-x64-capi.zip + curl -L https://github.com/microsoft/onnxruntime-genai/releases/download/v0.6.0/onnxruntime-genai-win-directml-x64-capi.zip -o onnxruntime-genai-win-directml-x64-capi.zip + tar -xvf onnxruntime-genai-win-directml-x64-capi.zip cd onnxruntime-genai-win-directml-x64-capi - tar xvf onnxruntime-genai-0.5.2-win-x64-dml.zip - copy onnxruntime-genai-0.5.2-win-x64-dml\include\* ..\include - copy onnxruntime-genai-0.5.2-win-x64-dml\lib\* ..\lib + tar -xvf onnxruntime-genai-0.6.0-win-x64-dml.zip + copy onnxruntime-genai-0.6.0-win-x64-dml\include\* ..\include + copy onnxruntime-genai-0.6.0-win-x64-dml\lib\* ..\lib cd .. ``` @@ -125,7 +127,7 @@ Change into the `onnxruntime-genai\examples\c` folder. ```cmd curl -L https://github.com/microsoft/onnxruntime/releases/download/v1.20.1/onnxruntime-win-arm64-1.20.1.zip -o onnxruntime-win-arm64-1.20.1.zip - tar xvf onnxruntime-win-arm64-1.20.1.zip + tar -xvf onnxruntime-win-arm64-1.20.1.zip copy onnxruntime-win-arm64-1.20.1\include\* include copy onnxruntime-win-arm64-1.20.1\lib\* lib ``` @@ -133,12 +135,12 @@ Change into the `onnxruntime-genai\examples\c` folder. 2. Install onnxruntime-genai ```cmd - curl -L https://github.com/microsoft/onnxruntime-genai/releases/download/v0.5.2/onnxruntime-genai-win-cpu-arm64-capi.zip -o onnxruntime-genai-win-cpu-arm64-capi.zip - tar xvf onnxruntime-genai-win-cpu-arm64-capi.zip + curl -L https://github.com/microsoft/onnxruntime-genai/releases/download/v0.6.0/onnxruntime-genai-win-cpu-arm64-capi.zip -o onnxruntime-genai-win-cpu-arm64-capi.zip + tar -xvf onnxruntime-genai-win-cpu-arm64-capi.zip cd onnxruntime-genai-win-cpu-arm64-capi - tar xvf onnxruntime-genai-0.5.2-win-arm64.zip - copy onnxruntime-genai-0.5.2-win-arm64\include\* ..\include - copy onnxruntime-genai-0.5.2-win-arm64\lib\* ..\lib + tar -xvf onnxruntime-genai-0.6.0-win-arm64.zip + copy onnxruntime-genai-0.6.0-win-arm64\include\* ..\include + copy onnxruntime-genai-0.6.0-win-arm64\lib\* ..\lib cd .. ``` @@ -169,7 +171,7 @@ Change into the `onnxruntime-genai\examples\c` folder. mkdir onnxruntime-win-arm64-directml cd onnxruntime-win-arm64-directml curl -L https://github.com/microsoft/onnxruntime/releases/download/v1.20.1/Microsoft.ML.OnnxRuntime.DirectML.1.20.1.nupkg -o Microsoft.ML.OnnxRuntime.DirectML.1.20.1.nupkg - tar xvf Microsoft.ML.OnnxRuntime.DirectML.1.20.1.nupkg + tar -xvf Microsoft.ML.OnnxRuntime.DirectML.1.20.1.nupkg copy build\native\include\* ..\include copy runtimes\win-arm64\native\* ..\lib cd .. @@ -178,12 +180,12 @@ Change into the `onnxruntime-genai\examples\c` folder. 2. Install onnxruntime-genai ```cmd - curl -L https://github.com/microsoft/onnxruntime-genai/releases/download/v0.5.2/onnxruntime-genai-win-directml-arm64-capi.zip -o onnxruntime-genai-win-directml-arm64-capi.zip - tar xvf onnxruntime-genai-win-directml-arm64-capi.zip + curl -L https://github.com/microsoft/onnxruntime-genai/releases/download/v0.6.0/onnxruntime-genai-win-directml-arm64-capi.zip -o onnxruntime-genai-win-directml-arm64-capi.zip + tar -xvf onnxruntime-genai-win-directml-arm64-capi.zip cd onnxruntime-genai-win-directml-arm64-capi - tar xvf onnxruntime-genai-0.5.2-win-arm64-dml.zip - copy onnxruntime-genai-0.5.2-win-arm64-dml\include\* ..\include - copy onnxruntime-genai-0.5.2-win-arm64-dml\lib\* ..\lib + tar -xvf onnxruntime-genai-0.6.0-win-arm64-dml.zip + copy onnxruntime-genai-0.6.0-win-arm64-dml\include\* ..\include + copy onnxruntime-genai-0.6.0-win-arm64-dml\lib\* ..\lib cd .. ``` @@ -281,7 +283,7 @@ Change into the onnxruntime-genai folder. ```cmd cd examples\c curl -L https://github.com/microsoft/onnxruntime/releases/download/v1.20.1/onnxruntime-win-x64-1.20.1.zip -o onnxruntime-win-x64-1.20.1.zip - tar xvf onnxruntime-win-x64-1.20.1.zip + tar -xvf onnxruntime-win-x64-1.20.1.zip copy onnxruntime-win-x64-1.20.1\include\* include copy onnxruntime-win-x64-1.20.1\lib\* lib ```