onnx / onnx-mlir

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

Release MLIRContext and Module before executing opt command for memory reduction #3000

Open imaihal opened 3 weeks ago

imaihal commented 3 weeks ago

This PR releases MLIRContext and Module before execution opt command. They are not necessary after writing LLVM bitcode. By releasing the module, the peak memory reduced a bit.