Skip to content

Commit 1b88e4d

Browse files
authored
update docs for zdlc-5.0.0 release (#29)
- [x] Update all the docs for ONNX-MLIR for zDLC5.0.0 - [x] Update to include new Credit Card Fraud Sample - [x] Update Dockerfile to use the latest Python 3.13 - [x] Update documentation for z17 --------- Signed-off-by: Sunny Anand <sunnyanand.979@gmail.com>
1 parent f0ee962 commit 1b88e4d

File tree

7 files changed

+786
-22
lines changed

7 files changed

+786
-22
lines changed

README.md

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ can then be integrated into C, C++, Java, or Python applications.
3434

3535
The compiled models take advantage of IBM zSystems technologies including SIMD
3636
on IBM z13 and later and the Integrated Accelerator for AI available on IBM z16
37-
without changes to the original model.
37+
and z17 without changes to the original model.
3838

3939
ONNX is an open format for representing AI models. It is open source and vendor
4040
neutral. Some AI frameworks directly support exporting to .onnx format. For
@@ -67,7 +67,7 @@ Determine the desired version of the zdlc image to download from the [IBM Z and
6767
Set ZDLC_IMAGE based on the desired IBM zDLC version:
6868

6969
```
70-
ZDLC_IMAGE=icr.io/ibmz/zdlc:4.3.0
70+
ZDLC_IMAGE=icr.io/ibmz/zdlc:5.0.0
7171
```
7272
<br>
7373

@@ -188,7 +188,7 @@ the model name (without the .onnx) in that directory.
188188
Use the `--EmitLib` option to build a `.so` shared library of the model specified by ZDLC_MODEL_NAME in [Environment variables](#setvars):
189189

190190
```
191-
docker run --rm -v ${ZDLC_MODEL_DIR}:/workdir:z ${ZDLC_IMAGE} --EmitLib --O3 --mcpu=z14 --mtriple=s390x-ibm-loz ${ZDLC_MODEL_NAME}.onnx
191+
docker run --rm -v ${ZDLC_MODEL_DIR}:/workdir:z ${ZDLC_IMAGE} --EmitLib --O3 -march=z17 --mtriple=s390x-ibm-loz ${ZDLC_MODEL_NAME}.onnx
192192
```
193193

194194
| Command<br>and<br>Parameters | Description |
@@ -199,7 +199,8 @@ docker run --rm -v ${ZDLC_MODEL_DIR}:/workdir:z ${ZDLC_IMAGE} --EmitLib --O3 --m
199199
| -v ${ZDLC_MODEL_DIR}:/workdir:z | The host bind mount points to the directory with the model ONNX file. `:z` is required to share the volume if SELinux is installed. |
200200
| --EmitLib | Build the `.so` shared library of the model. |
201201
| --O3 | Optimize to the highest level. |
202-
| --mcpu=z14 | The minimum CPU architecture (for generated code instructions). |
202+
| -march=z17 | The minimum CPU architecture (for generated code instructions).
203+
The `--mcpu` option is now replaced with the `-march` option. The `--mcpu` option is still supported but will be deprecated in the future. |
203204
| --mtriple=s390x-ibm-loz | The target architecture for generated code. |
204205
| ${ZDLC_MODEL_NAME}.onnx | Builds the `.so` shared library from the specified ONNX file. |
205206

@@ -292,7 +293,7 @@ in the container. The expected program output is ten random float values
292293
Use the `--EmitJNI` option to build a jar file of the model specified by ZDLC_MODEL_NAME in [Environment variables](#setvars).
293294

294295
```
295-
docker run --rm -v ${ZDLC_MODEL_DIR}:/workdir:z ${ZDLC_IMAGE} --EmitJNI --O3 --mcpu=z14 --mtriple=s390x-ibm-loz ${ZDLC_MODEL_NAME}.onnx
296+
docker run --rm -v ${ZDLC_MODEL_DIR}:/workdir:z ${ZDLC_IMAGE} --EmitJNI --O3 -march=z17 --mtriple=s390x-ibm-loz ${ZDLC_MODEL_NAME}.onnx
296297
```
297298

298299
| Command<br>and<br>Parameters | Description |
@@ -462,9 +463,9 @@ Note that the output values will be random since the input values are random.
462463
# IBM Z Integrated Accelerator for AI <a id="nnpa-overview"></a>
463464

464465
IBM z16 systems include a new Integrated Accelerator for AI to enable real-time
465-
AI for transaction processing at scale. The IBM Z Deep Learning Compiler helps
466-
your new and existing deep learning models take advantage of this new
467-
accelerator.
466+
AI for transaction processing at scale. IBM Z17 introduces the second genration
467+
of the Telum II processor. The IBM Z Deep Learning Compiler helps your new and
468+
existing deep learning models take advantage of this new accelerator.
468469

469470
Any IBM zSystem can be used to compile models to take advantage of the
470471
Integrated Accelerator for AI, including IBM z15 and older machines. However, if
@@ -490,13 +491,13 @@ No changes are required to your model.
490491
To compile a model to use the Integrated Accelerator for AI, The `--maccel=NNPA`
491492
option needs to be specified on the command line.
492493
Additionally, since the accelerator is only available for IBM z16 and greater,
493-
it is recommended to also use `--mcpu=16`.
494+
it is recommended to use `-march=z16` or `-march=z17`
494495

495496
Using the [`.so shared library example`](#build-so), the command line to compile
496497
models that take advantage of the Integrated Accelerator for AI is:
497498

498499
```
499-
docker run --rm -v ${ZDLC_MODEL_DIR}:/workdir:z ${ZDLC_IMAGE} --EmitLib --O3 --mcpu=z16 --mtriple=s390x-ibm-loz --maccel=NNPA ${ZDLC_MODEL_NAME}.onnx
500+
docker run --rm -v ${ZDLC_MODEL_DIR}:/workdir:z ${ZDLC_IMAGE} --EmitLib --O3 -march=z17 --mtriple=s390x-ibm-loz --maccel=NNPA ${ZDLC_MODEL_NAME}.onnx
500501
```
501502

502503
Once the model is built to use the IBM Z Integrated Accelerator for AI,
@@ -568,14 +569,14 @@ will run on NNPA. This can happen for reasons such as:
568569
* The operation will run faster on the CPU.
569570

570571
For details on obtaining or specifying the target for device placement see:
571-
* [Open source device placement documentation](https://github.com/onnx/onnx-mlir/blob/0.4.3.0/docs/DevicePlacement-NNPA.md) <a id=":device-placement"></a>
572+
* [Open source device placement documentation](https://github.com/onnx/onnx-mlir/blob/0.5.0.0/docs/DevicePlacement-NNPA.md) <a id=":device-placement"></a>
572573

573574
### Examples
574575

575576
1. Save default device placement json to a file while compiling a model.
576577

577578
```
578-
docker run --rm -v ${ZDLC_MODEL_DIR}:/workdir:z ${ZDLC_IMAGE} --EmitLib --O3 --mcpu=z16 --mtriple=s390x-ibm-loz --maccel=NNPA --nnpa-save-device-placement-file=${ZDLC_MODEL_NAME}.json ${ZDLC_MODEL_NAME}.onnx
579+
docker run --rm -v ${ZDLC_MODEL_DIR}:/workdir:z ${ZDLC_IMAGE} --EmitLib --O3 -march=z17 --mtriple=s390x-ibm-loz --maccel=NNPA --nnpa-save-device-placement-file=${ZDLC_MODEL_NAME}.json ${ZDLC_MODEL_NAME}.onnx
579580
```
580581

581582
* `--EmitLib` specifies to build a `.so` shared library of the model.
@@ -686,7 +687,7 @@ For details on obtaining or specifying the target for device placement see:
686687
In this example the device placement json file is used to specify that the `onnx.Gemm` node with name `Plus214-Times212_2` should target device `cpu` instead of `nnpa` as indicated in the device json file from the previous example.
687688

688689
```
689-
docker run --rm -v ${ZDLC_MODEL_DIR}:/workdir:z ${ZDLC_IMAGE} --EmitLib --O3 --mcpu=z16 --mtriple=s390x-ibm-loz --maccel=NNPA --nnpa-load-device-placement-file=${ZDLC_MODEL_NAME}.json ${ZDLC_MODEL_NAME}.onnx
690+
docker run --rm -v ${ZDLC_MODEL_DIR}:/workdir:z ${ZDLC_IMAGE} --EmitLib --O3 -march=z17 --mtriple=s390x-ibm-loz --maccel=NNPA --nnpa-load-device-placement-file=${ZDLC_MODEL_NAME}.json ${ZDLC_MODEL_NAME}.onnx
690691
```
691692

692693
* `--EmitLib` specifies to build a `.so` shared library of the model.
@@ -708,8 +709,8 @@ ONNX-MLIR accelerators are not supported by IBM zDLC.
708709
The following links lists supported operators, operator opset ranges, and any
709710
operator specific limitations. Operators that are not listed or usage of
710711
documented limitations are beyond IBM zDLC project scope:
711-
* [Supported ONNX Operation for CPU](https://github.com/onnx/onnx-mlir/blob/0.4.3.0/docs/SupportedONNXOps-cpu.md) <a id="cpu-ops"></a>
712-
* [Supported ONNX Operation for IBM Z Integrated Accelerator (NNPA)](https://github.com/onnx/onnx-mlir/blob/0.4.3.0/docs/SupportedONNXOps-NNPA.md) <a id="nnpa-ops"></a>
712+
* [Supported ONNX Operation for CPU](https://github.com/onnx/onnx-mlir/blob/0.5.0.0/docs/SupportedONNXOps-cpu.md) <a id="cpu-ops"></a>
713+
* [Supported ONNX Operation for IBM Z Integrated Accelerator (NNPA)](https://github.com/onnx/onnx-mlir/blob/0.5.0.0/docs/SupportedONNXOps-NNPA.md) <a id="nnpa-ops"></a>
713714

714715

715716
## Versioning Policy <a id="versioning"></a>
@@ -787,7 +788,7 @@ The values for the `--profile-ir` option are as follows:
787788

788789
Compiling the model:
789790
```
790-
docker run --rm -v ${ZDLC_MODEL_DIR}:/workdir:z ${ZDLC_IMAGE} --EmitLib --O3 --mcpu=z16 --mtriple=s390x-ibm-loz --maccel=NNPA --profile-ir=Onnx ${ZDLC_MODEL_NAME}.onnx
791+
docker run --rm -v ${ZDLC_MODEL_DIR}:/workdir:z ${ZDLC_IMAGE} --EmitLib --O3 -march=z17 --mtriple=s390x-ibm-loz --maccel=NNPA --profile-ir=Onnx ${ZDLC_MODEL_NAME}.onnx
791792
```
792793
Sample output when running model:
793794
```
@@ -800,7 +801,7 @@ The values for the `--profile-ir` option are as follows:
800801

801802
Compiling the model:
802803
```
803-
docker run --rm -v ${ZDLC_MODEL_DIR}:/workdir:z ${ZDLC_IMAGE} --EmitLib --O3 --mcpu=z16 --mtriple=s390x-ibm-loz --maccel=NNPA --profile-ir=ZHigh ${ZDLC_MODEL_NAME}.onnx
804+
docker run --rm -v ${ZDLC_MODEL_DIR}:/workdir:z ${ZDLC_IMAGE} --EmitLib --O3 -march=z17 --mtriple=s390x-ibm-loz --maccel=NNPA --profile-ir=ZHigh ${ZDLC_MODEL_NAME}.onnx
804805
```
805806
Sample output when running model:
806807
```
@@ -853,7 +854,7 @@ There are three types of instrument options that can be specified.
853854

854855
Compiling the model:
855856
```
856-
docker run --rm -v ${ZDLC_MODEL_DIR}:/workdir:z ${ZDLC_IMAGE} --EmitLib --O3 --mcpu=z16 --mtriple=s390x-ibm-loz --maccel=NNPA --instrument-stage=Onnx --instrument-ops=onnx.* --InstrumentBeforeOp --InstrumentAfterOp --InstrumentReportTime ${ZDLC_MODEL_NAME}.onnx
857+
docker run --rm -v ${ZDLC_MODEL_DIR}:/workdir:z ${ZDLC_IMAGE} --EmitLib --O3 -march=z17 --mtriple=s390x-ibm-loz --maccel=NNPA --instrument-stage=Onnx --instrument-ops=onnx.* --InstrumentBeforeOp --InstrumentAfterOp --InstrumentReportTime ${ZDLC_MODEL_NAME}.onnx
857858
```
858859
Sample output when running model:
859860
```
@@ -867,7 +868,7 @@ There are three types of instrument options that can be specified.
867868

868869
Compiling the model:
869870
```
870-
docker run --rm -v ${ZDLC_MODEL_DIR}:/workdir:z ${ZDLC_IMAGE} --EmitLib --O3 --mcpu=z16 --mtriple=s390x-ibm-loz --maccel=NNPA --instrument-stage=ZHigh --instrument-ops=onnx.*,zhigh.* --InstrumentBeforeOp --InstrumentAfterOp --InstrumentReportTime ${ZDLC_MODEL_NAME}.onnx
871+
docker run --rm -v ${ZDLC_MODEL_DIR}:/workdir:z ${ZDLC_IMAGE} --EmitLib --O3 -march=z17 --mtriple=s390x-ibm-loz --maccel=NNPA --instrument-stage=ZHigh --instrument-ops=onnx.*,zhigh.* --InstrumentBeforeOp --InstrumentAfterOp --InstrumentReportTime ${ZDLC_MODEL_NAME}.onnx
871872
```
872873
Sample output when running model:
873874
```
@@ -881,7 +882,7 @@ There are three types of instrument options that can be specified.
881882

882883
Compiling the model:
883884
```
884-
docker run --rm -v ${ZDLC_MODEL_DIR}:/workdir:z ${ZDLC_IMAGE} --EmitLib --O3 --mcpu=z16 --mtriple=s390x-ibm-loz --maccel=NNPA --instrument-stage=ZLow --instrument-ops=zlow.* --InstrumentBeforeOp --InstrumentAfterOp --InstrumentReportMemory ${ZDLC_MODEL_NAME}.onnx
885+
docker run --rm -v ${ZDLC_MODEL_DIR}:/workdir:z ${ZDLC_IMAGE} --EmitLib --O3 -march=z17 --mtriple=s390x-ibm-loz --maccel=NNPA --instrument-stage=ZLow --instrument-ops=zlow.* --InstrumentBeforeOp --InstrumentAfterOp --InstrumentReportMemory ${ZDLC_MODEL_NAME}.onnx
885886
```
886887
Sample output when running model:
887888
```
@@ -905,7 +906,7 @@ The `--opt-report=NNPAUnsupportedOps` flag is used to generate a report to infor
905906
### Example
906907

907908
```
908-
$ --EmitZHighIR --O3 --mcpu=z16 --mtriple=s390x-ibm-loz --maccel=NNPA model.onnx --opt-report=NNPAUnsupportedOps
909+
$ --EmitZHighIR --O3 -march=z17 --mtriple=s390x-ibm-loz --maccel=NNPA model.onnx --opt-report=NNPAUnsupportedOps
909910
910911
==NNPA-UNSUPPORTEDOPS-REPORT==, onnx.Mul, Mul_28, Element type is not F16 or F32.
911912
==NNPA-UNSUPPORTEDOPS-REPORT==, onnx.Add, Add_31, Element type is not F16 or F32.

0 commit comments

Comments
 (0)