-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
expand README.md #124
expand README.md #124
Conversation
README.md
Outdated
The docker toolchain needs to be in sync with the snitch runtime, as the hardware gets continuously updated. | ||
When updating the snitch runtime submodule, the docker image needs to be updated with the new commit hash to make sure the hardware and software are in sync. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to be either a duplicate sentence
README.md
Outdated
The docker toolchain needs to be in sync with the snitch runtime, as the hardware gets continuously updated. | ||
When updating the snitch runtime submodule, the docker image needs to be updated with the new commit hash to make sure the hardware and software are in sync. | ||
|
||
The easiest way to iterate on the docker image is to develop on it locally, and then pushing it to GitHub, which will detect that the toolchain directory is changed, and will release a new image automatically. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The easiest way to iterate on the docker image is to develop on it locally, and then pushing it to GitHub, which will detect that the toolchain directory is changed, and will release a new image automatically. | |
The easiest way to iterate on the docker image is to develop on it locally, and then push the changes to GitHub, which will detect that the toolchain directory is changed, and will release a new image automatically. |
README.md
Outdated
## Compiling Neural Networks | ||
|
||
Any information you can find on how to use `iree-compile` is applicable, with the only major difference bing the `--iree-hal-target-backends=llvm-cpu`, which also supports our `quidditch` value for the flag, which leverages our flow. | ||
The inputs to `iree-compile` are all `.mlir` files, so you need to somehow get the file, [here's](https://iree.dev/guides/deployment-configurations/cpu/#compile-and-run-a-program) the guide on how to get one. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The inputs to `iree-compile` are all `.mlir` files, so you need to somehow get the file, [here's](https://iree.dev/guides/deployment-configurations/cpu/#compile-and-run-a-program) the guide on how to get one. | |
The inputs to `iree-compile` are all `.mlir` files, so you need to somehow get the file, [here's](https://iree.dev/guides/ml-frameworks/) the guide on how to get one. |
is probably the better link
README.md
Outdated
|
||
The PyTorch flow uses [iree-turbine](https://github.com/iree-org/iree-turbine), which is included in the virtualenv of the Docker container. | ||
We use it to compile nsnet2 (`runtime/samples/nsnet2/NsNet2.py`). | ||
The MLIR file extracted this way is that it will contain functions that are named the same as the Python model functions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The MLIR file extracted this way is that it will contain functions that are named the same as the Python model functions. | |
The MLIR file extracted this way will contain functions that are named the same as the Python model functions. |
README.md
Outdated
|
||
The `quiddtch_module` macro in the `CMakeLists.txt` turns the MLIR file into an executable. | ||
`ASSERT_XDSL` is a flag that will error out if xDSL micro-kernel compilation fails. | ||
This macro creates an executable called `mynewmodel` (removing the `.mlir` suffix). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This macro creates an executable called `mynewmodel` (removing the `.mlir` suffix). | |
This macro creates a library called `mynewmodel` (removing the `.mlir` suffix). |
README.md
Outdated
4. The cmake build system mirrors your source directory, so if you added `runtime/samples/mynewmodel/`, the build location will be `build/runtime/samples/mynewmodel`. | ||
5. Add your new executable to `tests/CMakeLists.txt` | ||
|
||
> NB. you can override the compilation with xDSL by adding `LLVM` to the `uidditch_module` macro, which overrides the XDSL pipeline entirely and just computes everything with stock IREE `llvm-cpu` target. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
> NB. you can override the compilation with xDSL by adding `LLVM` to the `uidditch_module` macro, which overrides the XDSL pipeline entirely and just computes everything with stock IREE `llvm-cpu` target. | |
> NB. you can override the compilation with xDSL by adding `LLVM` to the `quidditch_module` macro, which overrides the XDSL pipeline entirely and just computes everything with stock IREE `llvm-cpu` target. |
|
||
## Quidditch Compiler Structure | ||
|
||
All source code is in `codegen/compiler/src/Quirritch`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All source code is in `codegen/compiler/src/Quirritch`. | |
All source code is in `codegen/compiler/src/Quidditch`. |
README.md
Outdated
|
||
`QuidditchTarget.cpp` | ||
|
||
The QuidditchTargetBackend class sibclasses IREE::HAL::TargetBackend. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The QuidditchTargetBackend class sibclasses IREE::HAL::TargetBackend. | |
The QuidditchTargetBackend class subclasses IREE::HAL::TargetBackend. |
README.md
Outdated
|
||
### Dialect | ||
|
||
There is currently only one dialect, `snitch`, which might be split up in the future. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is currently only one dialect, `snitch`, which might be split up in the future. | |
There is currently only one dialect, `quidditch_snitch`, which might be split up in the future. |
These are the notes I took, as well as the existing README. Could you please double-check that the information is correct, and let me know if anything needs to changed?
CC @compor