-
Notifications
You must be signed in to change notification settings - Fork 319
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Option to not emit the full MLIR (only emit .tmp file) (#2997)
When emitting MLIR, 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. This option specify not emit full MLIR(<name>.onnx.mlir). This option works with emitting MLIR options such as --EmitONNXIR and --EmitMLIR. Signed-off-by: Haruki Imai <[email protected]>
- Loading branch information
Showing
4 changed files
with
30 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// RUN: onnx-mlir --EmitMLIR --do-not-emit-full-mlir-code %s -o %t && test ! -f %t.onnx.mlir && rm %t.tmp | ||
|
||
module { | ||
func.func @main_graph(%arg0: tensor<?xf32>) -> tensor<?xf32> { | ||
onnx.Return %arg0 : tensor<?xf32> | ||
} | ||
"onnx.EntryPoint"() {func = @main_graph} : () -> () | ||
} | ||
|