You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: On a fresh install, if you get `CMake Error: Could not find CMAKE_ROOT !!!`, just deactivate and reactivate your python environment.
125
+
### Building/Using & Testing Operators
127
126
128
-
### Building & Testing
127
+
All available operators can be found in`operators`. These each contain:
129
128
130
-
> NOTE: Be sure the XRT setup script has been sourced:
131
-
>`source /opt/xilinx/xrt/setup.sh`
132
-
133
-
IRON is a CMake-based project. To configure the project, run:
134
-
```shell
135
-
cmake -B build
136
-
```
137
-
138
-
> Note: By default, the project is built for AIE2P. To build for AIE2, set the target using:
139
-
>`cmake -B build -DIRONCLAD_AIE_TARGET=aie2`
129
+
*`op.py`: The Python operator interface -- an easy access point to integrate operators into your project that prescribes how to compile the operator (build artifacts) and how to call it at runtime (buffer sizes, etc.)
130
+
*`design.py`: The implementation of the operator's NPU code. Often references a kernel in `aie_kernels` for the compute core code and describes the data movement using ObjectFIFOs.
131
+
* `reference.py`: A reference CPU implementation to validate the correctness of the NPU implementation.
132
+
* `test.py`: An end-to-end test that instantiates and builds the operator, runs it and verifies its outputs against the reference.
140
133
141
-
To build all designs, use:
142
-
```shell
143
-
cmake --build build
144
-
```
134
+
> NOTE: Be sure the XRT setup script has been sourced and the Python environment is activated:
135
+
> `source /opt/xilinx/xrt/setup.sh`
136
+
> `source /path/to/ironenv/bin/activate`
145
137
146
-
To test all the designs, use the following python script:
138
+
To build and test all the operators, first generate a list of all test cases, then run them:
147
139
``` python
148
-
./scripts/run_tests.py --iter 1
140
+
mkdir testing && cd testing
141
+
../operators/common/discover_tests.py
142
+
../scripts/run_tests.py --iter 1
149
143
```
150
-
You can selecta single test to run using the `--select` flag.
151
144
152
-
> Targets are listed when running `cmake -B build` with the following syntax:
0 commit comments