-
Notifications
You must be signed in to change notification settings - Fork 668
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Preserve reflection attrs on functions when wrapping for the native A…
- Loading branch information
Showing
10 changed files
with
98 additions
and
40 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
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
18 changes: 0 additions & 18 deletions
18
compiler/src/iree/compiler/Dialect/VM/Target/Bytecode/test/function_attrs.mlir
This file was deleted.
Oops, something went wrong.
31 changes: 31 additions & 0 deletions
31
compiler/src/iree/compiler/Dialect/VM/Target/Bytecode/test/reflection_attrs.mlir
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,31 @@ | ||
// RUN: iree-compile --split-input-file --compile-mode=vm \ | ||
// RUN: --iree-vm-bytecode-module-output-format=flatbuffer-text %s | FileCheck %s | ||
|
||
// CHECK-LABEL: simple_module | ||
// CHECK: "attrs": | ||
// CHECK: "key": "module_attr_0" | ||
// CHECK: "value": "MODULE_ATTR_0" | ||
// CHECK: "key": "module_attr_1" | ||
// CHECK: "value": "MODULE_ATTR_1" | ||
vm.module @simple_module attributes { | ||
iree.reflection = { | ||
module_attr_0 = "MODULE_ATTR_0", | ||
module_attr_1 = "MODULE_ATTR_1" | ||
} | ||
} { | ||
vm.export @func | ||
// CHECK: "exported_functions": | ||
// CHECK: "attrs": | ||
// CHECK: "key": "func_attr_0" | ||
// CHECK: "value": "FUNC_ATTR_0" | ||
// CHECK: "key": "func_attr_1" | ||
// CHECK: "value": "FUNC_ATTR_1" | ||
vm.func @func(%arg0 : i32) -> i32 attributes { | ||
iree.reflection = { | ||
func_attr_0 = "FUNC_ATTR_0", | ||
func_attr_1 = "FUNC_ATTR_1" | ||
} | ||
} { | ||
vm.return %arg0 : i32 | ||
} | ||
} |
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