Skip to content

Commit

Permalink
Fix pre-commit issue with README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
silee2 committed Apr 19, 2023
1 parent e9ca05e commit 62661c8
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,24 +195,24 @@ cmake --build . --target check-imex
Add '-v' to the above command-line to get verbose output.

## Benchmarking
IMEX provides an initial set of benchmarks for studying its performance. To build these benchmarks, users need
to manually add `-DIMEX_ENABLE_BENCHMARK=ON` option when building the IMEX. The benchmark testcases and the
script for running them will be generated under the `build/benchmarks` folder.
IMEX provides an initial set of benchmarks for studying its performance. To build these benchmarks, users need
to manually add `-DIMEX_ENABLE_BENCHMARK=ON` option when building the IMEX. The benchmark testcases and the
script for running them will be generated under the `build/benchmarks` folder.

Currently, IMEX provides benchmarks for the following 4 categories of operations:
| Operation | CPU | GPU |
Currently, IMEX provides benchmarks for the following 4 categories of operations:
| Operation | CPU | GPU |
| :---: | :---: | :---: |
| elementwise (relu and silu) | Yes | Yes |
| reduction (softmax) | Yes | Yes |
| transpose (transpose) | Yes | Yes |
| fusion (kInputFusion and kLoopFusion) | No | Yes |

These test cases are mainly implemented using linalg dialect, and the spriv test cases for
These test cases are mainly implemented using linalg dialect, and the spriv test cases for
relu are also provided. Each testcase is named following the pattern of `opname_shape_dtype.mlir`

### How to run ?
For simplicity, the `bench_imex` script is provided to run the benchmark. It can take a mlir file or a folder as input.
for the later case, it will simply run all test cases inside the folder. In addition, it also has to choose a runtime
for the later case, it will simply run all test cases inside the folder. In addition, it also has to choose a runtime
based on the option. It accepts one of the following three options:
- `-c` for cpu runtime
- `-l` for level-zero runtime (for INTEL GPU)
Expand All @@ -227,8 +227,8 @@ based on the option. It accepts one of the following three options:
# run a set of test cases on GPU using sycl runtime
./bench_imex -s relu/gpu/
```
> **NOTE**: if you are using `-c`, please use testcases under `cpu` subfolder; similarly, if you are using `-s` or `-l`,
> please use testcases under `gpu` subfolder. Otherwise, it may have unspecified errors or behaviors.
> **NOTE**: if you are using `-c`, please use testcases under `cpu` subfolder; similarly, if you are using `-s` or `-l`,
> please use testcases under `gpu` subfolder. Otherwise, it may have unspecified errors or behaviors.

### How to customize the benchmark ?
Expand All @@ -239,8 +239,8 @@ IMEX benchmark suite is implemented using CMAKE template, and initially provides
- Transpose: 128x136, 1024x1024, 16x96x96, 96x7x96
- Reduce: 32x16x512x512

Users can extend it to evaluate more shapes by editing the, e.g, `relu.shapes.in` file, in each subfolder, and then
rebuild the imex. User can also add new data types, but it is currently only limited to basic data types including
Users can extend it to evaluate more shapes by editing the, e.g, `relu.shapes.in` file, in each subfolder, and then
rebuild the imex. User can also add new data types, but it is currently only limited to basic data types including
fp32, fp16, int32 etc.


Expand Down

0 comments on commit 62661c8

Please sign in to comment.