onnx / onnx-mlir

Representation and Reference Lowering of ONNX Models in MLIR Compiler Infrastructure
Apache License 2.0
770 stars 321 forks source link

Option to not emit the full MLIR (only emit .tmp file) #2997

Closed imaihal closed 2 weeks ago

imaihal commented 3 weeks ago

When emitting MLIR by the option such as --EmitONNXIRetc., there are two versions of IR, <name>.onnx.mlir and <name>.tmp . Since the constant values are embedded in <name>.onnx.mlir, we got memory and disk pressure especially in large models. In mistral-7b model, the MLIR size is about 50GB. This PR provides an option to not emit full MLIR(<name>.onnx.mlir). This option works with emitting MLIR options such as --EmitONNXIR and --EmitMLIR.

jenkins-droid commented 2 weeks ago

Jenkins Linux ppc64le Build #14981 [push] Option to not emit the f... started at 01:27

jenkins-droid commented 2 weeks ago

Jenkins Linux s390x Build #15955 [push] Option to not emit the f... started at 01:14

jenkins-droid commented 2 weeks ago

Jenkins Linux amd64 Build #15952 [push] Option to not emit the f... started at 00:14

jenkins-droid commented 2 weeks ago

Jenkins Linux amd64 Build #15952 [push] Option to not emit the f... passed after 1 hr 20 min

jenkins-droid commented 2 weeks ago

Jenkins Linux s390x Build #15955 [push] Option to not emit the f... passed after 1 hr 58 min

jenkins-droid commented 2 weeks ago

Jenkins Linux ppc64le Build #14981 [push] Option to not emit the f... passed after 2 hr 21 min