AI on IBM Z & LinuxONE - Group home

3Q 2022 Update for IBM Z Deep Learning Compiler / ONNX-MLIR available

By Charles Volzka posted Mon October 03, 2022 09:46 AM

  

3Q 2022 Update for IBM Z Deep Learning Compiler / ONNX-MLIR available

Today we are excited to announce and updated image for the IBM Z Deep Learning Compiler (IBM zDLC) / ONNX-MLIR is now available on the IBM Z and LinuxONE Container Image Registry as onnx-mlir:v0.3.1 and an updated tutorial is available at https://github.com/IBM/zDLC

This update focuses on performance improvements, bug fixes, and security updates. One new addition includes support for a new --onnx-op-stats flag. When used, this shows at compile time which operations of the model will be run on the CPU versus the AI accelerator.

For example, compiling the mnist-12 model for CPU:

--O3 --EmitLib --mtriple=s390x-ibm-loz --mcpu=z16 mnist-12.onnx -o CPU/mnist-12.zosdev.main --onnx-op-stats TXT
Operations encountered:
-----------------------
func.func , 1
func.return , 1
onnx.Constant , 8
onnx.Conv , 2
onnx.Gemm , 1
onnx.MaxPoolSingleOut , 2
onnx.Relu , 2
onnx.Reshape , 2
The same model compiled to take advantage of IBM z16 AI accelerator:
--O3 --EmitLib --mtriple=s390x-ibm-loz --mcpu=z16 --maccel=NNPA mnist-12.onnx -o NNPA/mnist-12.zosdev.main --onnx-op-stats TXT
Operations encountered:
-----------------------
func.func , 1
func.return , 1
onnx.Constant , 3
onnx.NoValue , 1
onnx.Reshape , 2
zhigh.Add , 1
zhigh.Conv2D , 2
zhigh.MatMul , 1
zhigh.MaxPool2D , 2
zhigh.Stick , 3
zhigh.StickifiedConstant , 5
zhigh.Unstick , 2

In the output, operations that start with onnx.* indicate that they will run on CPU and those that start with zhigh.* will run on the accelerator.  

This new feature works great in conjunction with the existing --shapeInformation setting to determine if specifying a static shape may affect accelerator performance. For more information see Performance tips for IBM Z Integrated Accelerator for AI in the tutorial.

If you have questions on getting started with AI on IBM Z, reach out to us at aionz@us.ibm.com

0 comments
3 views