Skip to content

Commit

Permalink
Push docs and doxygen updates into gh-pages branch
Browse files Browse the repository at this point in the history
  • Loading branch information
Doxygen Bot (GitHub Action) committed Aug 27, 2024
1 parent e9c4fc4 commit 16bbe93
Showing 1 changed file with 17 additions and 9 deletions.
26 changes: 17 additions & 9 deletions BuildONNX.md
Original file line number Diff line number Diff line change
Expand Up @@ -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=<your path to pybind>`). 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=<your path to pybind>`). 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 <filename>` 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 <filename>` for files that might have been changed before doing a PR.**

## Known issues

Expand Down

0 comments on commit 16bbe93

Please sign in to comment.