-
Notifications
You must be signed in to change notification settings - Fork 663
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[i1] Remove command line option to enable packed storage
* only use `#iree_encoding.packed_storage` to designate if an `i1` tensor is of packed memory layout. * remove `iree-experimental-packed-i1-storage` command line option. * teach type converters to allow casting into packed tensor types Signed-off-by: Alan Li <me@alanli.org>
- Loading branch information
Showing
25 changed files
with
196 additions
and
214 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
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
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
29 changes: 29 additions & 0 deletions
29
...src/iree/compiler/Dialect/Stream/Transforms/test/encode_host_tensors_packing_i1_attr.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,29 @@ | ||
// RUN: iree-opt --split-input-file --iree-stream-encode-host-tensors %s | FileCheck %s | ||
|
||
#packed = #iree_encoding.packed_storage | ||
func.func @unaligned_i1_size() -> index { | ||
%0 = stream.tensor.sizeof tensor<12xi1, #packed> : index | ||
return %0 : index | ||
} | ||
// CHECK: func @unaligned_i1_size() -> index { | ||
// CHECK-DAG: %[[C2:.+]] = arith.constant 2 : index | ||
// CHECK: return %[[C2]] : index | ||
|
||
// ----- | ||
|
||
#packed = #iree_encoding.packed_storage | ||
func.func @aligned_i1_size() -> index { | ||
%0 = stream.tensor.sizeof tensor<24xi1, #packed> : index | ||
return %0 : index | ||
} | ||
|
||
// CHECK: func @aligned_i1_size() -> index { | ||
// CHECK-DAG: %[[C3:.+]] = arith.constant 3 : index | ||
// CHECK: return %[[C3]] : index | ||
|
||
// ----- | ||
|
||
#packed = #iree_encoding.packed_storage | ||
func.func @packed_i1_input_output(%input : tensor<16xi1, #packed>) -> tensor<16xi1, #packed> { | ||
return %input : tensor<16xi1, #packed> | ||
} |
Oops, something went wrong.