Skip to content

Commit

Permalink
Add comments to the tests.
Browse files Browse the repository at this point in the history
Signed-off-by: hanhanW <[email protected]>
  • Loading branch information
hanhanW committed Jan 7, 2025
1 parent 92a9908 commit 86dd9b0
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,19 +1,24 @@
// RUN: iree-opt --split-input-file --iree-stream-specialize-encodings %s | FileCheck %s

#executable_target_vmvx_bytecode_fb = #hal.executable.target<"vmvx", "vmvx-bytecode-fb", {encoding_layout = #iree_cpu.vmvx_encoding_layout<>, ukernels = "all"}>
//------------------------------------------------------------------------------
// Stream ops that have TensorPhaseOp trait. This test suite tests that the
// encoding is updated that carries resolved layouts.
//------------------------------------------------------------------------------

#executable_target_vmvx_bytecode_fb = #hal.executable.target<"vmvx", "vmvx-bytecode-fb", {encoding_layout = #iree_cpu.vmvx_encoding_layout<>}>
#device_target_local_0_ = #hal.device.target<"local", {ordinal = 0 : index}, [#executable_target_vmvx_bytecode_fb]> : !hal.device
#encoding = #iree_encoding.encoding<operand_index = 0 : index, op_type = matmul, element_types = [f32, f32, f32]>
module {
util.global private @device_a = #device_target_local_0_

util.func public @main(%d0: index, %d1: index) -> index {
util.func public @tensor_sizeof(%d0: index, %d1: index) -> index {
%size = stream.tensor.sizeof on(#hal.device.affinity<@device_a>) tensor<?x?xf32, #encoding>{%d0, %d1} : index
util.return %size : index
}
}
// CHECK: #[[EXECUTABLE:.+]] = #hal.executable.target<"vmvx",
// CHECK: #[[$ENCODING:.+]] = #iree_encoding.encoding
// CHECK-SAME: layouts = [#[[EXECUTABLE]]]
// CHECK-LABEL: util.func public @main
// CHECK-LABEL: util.func public @tensor_sizeof
// CHECK: %[[RES:.+]] = stream.tensor.sizeof {{.+}} tensor<?x?xf32, #[[$ENCODING]]>
// CHECK: return %[[RES]]

0 comments on commit 86dd9b0

Please sign in to comment.