From 16bbe935cee38065da50bb4b0a8ef05b2eb2ecbf Mon Sep 17 00:00:00 2001 From: "Doxygen Bot (GitHub Action)" Date: Tue, 27 Aug 2024 17:09:30 +0000 Subject: [PATCH] Push docs and doxygen updates into gh-pages branch --- BuildONNX.md | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/BuildONNX.md b/BuildONNX.md index 2e932df876..c47eefbce0 100644 --- a/BuildONNX.md +++ b/BuildONNX.md @@ -6,32 +6,40 @@ Backend tests are triggered by `make check-onnx-backend` in the build directory You will need to install python 3.x if its not default in your environment, and possibly set the cmake `PYTHON_EXECUTABLE` variable in your top cmake file. -You will also need `pybind11` which may need to be installed (mac: `brew install pybind11` or linux: `apt -y install python3-pybind11` for example) and you may need to indicate where to find the software (Mac, POWER, possibly other platforms: `export pybind11_DIR=`). Then install the `third_party/onnx` software (Mac: `pip install -e third_party/onnx`) typed in the top directory. +You will also need `pybind11` which may need to be installed (mac: `brew install pybind11` or linux: `apt -y install python3-pybind11` for example) and you may need to indicate where to find the software (Mac, POWER, possibly other platforms: `export pybind11_DIR=`). Then install the `third_party/onnx` software (Mac: `pip install third_party/onnx`) typed in the top directory. ## Upgrading ONNX in ONNX-MLIR - + Here are the steps taken to upgrade the ONNX version: 1. Create your own branch -2. cd into `third_party/onnx` and checkout the commit for the latest version of onnx (You can find the latest commit here: https://github.com/onnx/onnx/releases) +2. "cd" into `third_party/onnx` and checkout the commit for the latest version of onnx (You can find the latest commit here: https://github.com/onnx/onnx/releases) -3. pip uninstall onnx (remove older version) +3. "pip uninstall onnx" (remove older version) -4. In `onnx-mlir/` directory, pip install —user third_party/onnx (install onnx from the commit and not online version) +4. In `onnx-mlir/` directory, "pip install third_party/onnx" (install onnx from the commit and not online version) 5. Update `utils/gen_onnx_mlir.py` file with the correct version number 6. Build onnx in the `build/` directory using: set CMAKE_ARGS=-DONNX_USE_LITE_PROTO=ON -7. Run in the `build/` directory : make OMONNXOpsIncTranslation +7. Run in the `build/` directory : "make OMONNXOpsIncTranslation" -8. Run in `build/` directory : make onnx-mlir-docs +8. Run in `build/` directory : "make onnx-mlir-docs" +9. Run in `build/` directory : "make check-onnx-backend-case" -**Note: Please use `git add ` for files that might have been changed before doing a PR.** +10. Update the [new backend tests](https://github.com/onnx/onnx-mlir/blob/main/test/backend/all_test_names.txt) based on the results from `step 9` + +11. Update the [Opset documentation for cpu](https://github.com/onnx/onnx-mlir/blob/main/test/backend/inference_backend.py) and then issue the following command in the `build/` directory: "make onnx_mlir_supported_ops_cpu" -**Tip: Check that we have the right version of `third_party/onnx` committed by looking in the PR and clicking on the files that are changed. You should be redirected to the appropriate onnx commit hash.** +12. Update the [Opset documentation for NNPA](https://github.com/onnx/onnx-mlir/blob/main/test/backend/inference_backend.py) and then issue the following command in the `build/` directory: "make onnx_mlir_supported_ops_NNPA" + +13. Ensure the lit tests and backend tests pass successfully and then you are done! + + +**Note: Please use `git add ` for files that might have been changed before doing a PR.** ## Known issues