onnx-mlir icon indicating copy to clipboard operation
onnx-mlir copied to clipboard

Show the compilation phases

Open tungld opened this issue 1 year ago • 3 comments

This patch is to show the compilation phases which is helpful when compiling a big model that takes a long time.

This is one example of the printed information:

$ onnx-mlir -mcpu=z16 -maccel=NNPA bert_base_uncased_1.onnx
[1/5] Wed Jul  3 03:36:50 2024 Importing ONNX Model to MLIR Module
[2/5] Wed Jul  3 03:36:51 2024 Compiling and Optimizing MLIR Module
[3/5] Wed Jul  3 03:37:14 2024 Translating MLIR Module to LLVM and Generating LLVM Optimized Bitcode
[4/5] Wed Jul  3 03:37:35 2024 Generating Object from LLVM Bitcode
[5/5] Wed Jul  3 03:37:39 2024 Linking and Generating the Output Shared Library

Starting time is added to each phase so that users know how long the current phase takes

tungld avatar Jul 03 '24 07:07 tungld

FYI @tehbone

tungld avatar Jul 03 '24 07:07 tungld

Is this default behavior or enabled via switch?

tehbone avatar Jul 03 '24 13:07 tehbone

Is this default behavior or enabled via switch?

Yes, it's on by default. Let me know if you want a switch or set it off.

tungld avatar Jul 04 '24 02:07 tungld

Jenkins Linux s390x Build #15079 [push] Show the compilation pha... started at 20:37

jenkins-droid avatar Jul 08 '24 00:07 jenkins-droid

Jenkins Linux ppc64le Build #14104 [push] Show the compilation pha... started at 20:47

jenkins-droid avatar Jul 08 '24 00:07 jenkins-droid

Jenkins Linux amd64 Build #15074 [push] Show the compilation pha... started at 19:37

jenkins-droid avatar Jul 08 '24 00:07 jenkins-droid

Jenkins Linux amd64 Build #15074 [push] Show the compilation pha... passed after 1 hr 6 min

jenkins-droid avatar Jul 08 '24 01:07 jenkins-droid

Jenkins Linux s390x Build #15079 [push] Show the compilation pha... passed after 1 hr 33 min

jenkins-droid avatar Jul 08 '24 02:07 jenkins-droid

Jenkins Linux ppc64le Build #14104 [push] Show the compilation pha... passed after 2 hr 7 min

jenkins-droid avatar Jul 08 '24 02:07 jenkins-droid