forked from llvm/torch-mlir
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generate datalayout in module. (llvm#1021)
* Generate datalayout in module. Signed-off-by: Ettore Tiotto <[email protected]> * Generate datalayout in module. Signed-off-by: Ettore Tiotto <[email protected]>
- Loading branch information
Ettore Tiotto
authored
Dec 2, 2021
1 parent
fff1222
commit ca7e746
Showing
7 changed files
with
111 additions
and
36 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
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
// RUN: onnx-mlir-opt --convert-krnl-to-llvm %s -split-input-file | FileCheck %s | ||
// RUN: onnx-mlir --printIR %s | FileCheck %s | ||
|
||
// CHECK: module attributes {llvm.data_layout = "E"} | ||
// CHECK: module attributes {llvm.data_layout = "E-{{.*}}"} | ||
module { | ||
} | ||
|
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
// RUN: onnx-mlir-opt --convert-krnl-to-llvm %s -split-input-file | FileCheck %s | ||
// RUN: onnx-mlir --printIR %s | FileCheck %s | ||
|
||
// CHECK: module attributes {llvm.data_layout = "e"} | ||
// CHECK: module attributes {llvm.data_layout = "e-{{.*}}"} | ||
module { | ||
} |
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 |
---|---|---|
@@ -1,11 +1,11 @@ | ||
|
||
// RUN: onnx-mlir --EmitMLIR --preserveLocations --printIR %s | FileCheck %s --check-prefix=PRESENT; rm %p/*.onnx.mlir ; rm %p/*.tmp | ||
// RUN: onnx-mlir --EmitMLIR --printIR %s | FileCheck %s --check-prefix=ABSENT; rm %p/*.onnx.mlir ; rm %p/*.tmp | ||
// RUN: onnx-mlir --preserveLocations --printIR %s | FileCheck %s --check-prefix=PRESENT | ||
// RUN: onnx-mlir --printIR %s | FileCheck %s --check-prefix=ABSENT | ||
|
||
func @main_graph(%arg0: tensor<1x16xf32>, %arg1: tensor<1x16xf32>) -> tensor<1x16xf32> { | ||
%0 = "onnx.Add"(%arg0, %arg1) : (tensor<1x16xf32>, tensor<1x16xf32>) -> tensor<1x16xf32> loc("/build/workspace/addop.onnx":1:0) | ||
return %0 : tensor<1x16xf32> | ||
} | ||
|
||
// PRESENT: loc("onnx.Add"("{{(/[[:alnum:]]+)+}}.onnx":1:0)) | ||
// ABSENT-NOT: loc("{{("onnx.Add"(/[[:alnum:]]+)+}}.onnx":1:0)) | ||
// PRESENT: loc("onnx.Add"("{{(/[[:alnum:]]+)+}}.onnx":1:0)) | ||
// ABSENT-NOT: loc("onnx.Add"("{{(/[[:alnum:]]+)+}}.onnx":1:0)) |