Skip to content

Commit da42644

Browse files
committed
add more tests
1 parent d4f37fb commit da42644

File tree

4 files changed

+21
-15
lines changed

4 files changed

+21
-15
lines changed

examples/core/vec_add.desc.off

Lines changed: 0 additions & 8 deletions
This file was deleted.
File renamed without changes.

examples/core/vec_add_3.desc.off

Lines changed: 0 additions & 7 deletions
This file was deleted.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
source: tests/mlir/core.rs
3+
expression: output
4+
---
5+
module {
6+
func.func @add(%arg0: memref<16xi16, #hivm.address_space<gm>>, %arg1: memref<16xi16, #hivm.address_space<gm>>, %arg2: memref<16xi16, #hivm.address_space<gm>>, %arg3: memref<16xi16, #hivm.address_space<gm>>, %arg4: memref<16xi16, #hivm.address_space<gm>>) attributes {hacc.entry, hacc.function_kind = #hacc.function_kind<DEVICE>} {
7+
%alloc = memref.alloc() : memref<16xi16, #hivm.address_space<ub>>
8+
hivm.hir.load ins(%arg0 : memref<16xi16, #hivm.address_space<gm>>) outs(%alloc : memref<16xi16, #hivm.address_space<ub>>)
9+
%alloc_0 = memref.alloc() : memref<16xi16, #hivm.address_space<ub>>
10+
hivm.hir.load ins(%arg1 : memref<16xi16, #hivm.address_space<gm>>) outs(%alloc_0 : memref<16xi16, #hivm.address_space<ub>>)
11+
%alloc_1 = memref.alloc() : memref<16xi16, #hivm.address_space<ub>>
12+
hivm.hir.load ins(%arg2 : memref<16xi16, #hivm.address_space<gm>>) outs(%alloc_1 : memref<16xi16, #hivm.address_space<ub>>)
13+
%alloc_2 = memref.alloc() : memref<16xi16, #hivm.address_space<ub>>
14+
hivm.hir.vadd ins(%alloc, %alloc_0 : memref<16xi16, #hivm.address_space<ub>>, memref<16xi16, #hivm.address_space<ub>>) outs(%alloc_2 : memref<16xi16, #hivm.address_space<ub>>)
15+
hivm.hir.store ins(%alloc_2 : memref<16xi16, #hivm.address_space<ub>>) outs(%arg3 : memref<16xi16, #hivm.address_space<gm>>)
16+
%alloc_3 = memref.alloc() : memref<16xi16, #hivm.address_space<ub>>
17+
hivm.hir.vadd ins(%alloc_0, %alloc_1 : memref<16xi16, #hivm.address_space<ub>>, memref<16xi16, #hivm.address_space<ub>>) outs(%alloc_3 : memref<16xi16, #hivm.address_space<ub>>)
18+
hivm.hir.store ins(%alloc_3 : memref<16xi16, #hivm.address_space<ub>>) outs(%arg4 : memref<16xi16, #hivm.address_space<gm>>)
19+
return
20+
}
21+
}

0 commit comments

Comments
 (0)