Skip to content

Commit

Permalink
Update tests to pass in func call link through aircc
Browse files Browse the repository at this point in the history
  • Loading branch information
erwei-xilinx committed Feb 24, 2025
1 parent f4fe32b commit 122c14c
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 21 deletions.
5 changes: 3 additions & 2 deletions test/xrt/07_extern_linalg/gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ def add(lhs, rhs, out):
+ ",".join(
[
"func.func(air-lower-herd-parallel)",
"air-linalg-to-func",
]
)
+ ")"
Expand All @@ -86,5 +85,7 @@ def add(lhs, rhs, out):
# Run compile and load
###############################################

backend = XRTBackend()
backend = XRTBackend(
lower_linalg_to_func="kernel.o",
)
module_function = backend.compile_and_load(module)
5 changes: 2 additions & 3 deletions test/xrt/12_matmul_transform_1x4_bf16/gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ def forward(lhs, rhs, out):
+ ",".join(
[
"air-copy-to-dma",
"air-linalg-to-func{link-with=kernel.o}",
"air-par-to-herd{depth=-1}",
"air-par-to-launch{has-air-segment=1}",
"scf-forall-to-for",
Expand All @@ -137,6 +136,6 @@ def forward(lhs, rhs, out):
backend = XRTBackend(
air_loop_fusion=True,
runtime_loop_tiling_sizes=[1, 1],
lower_linalg_to_func=True,
lower_linalg_to_func="kernel.o",
)
module_function = backend.compile_and_load(air_module)
module_function = backend.compile_and_load(air_module)
3 changes: 1 addition & 2 deletions test/xrt/15_gemm_peeling_extern_vec_4x4_bf16/gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,6 @@
+ ",".join(
[
"buffer-results-to-out-params",
"air-linalg-to-func{link-with=mm.o}",
"air-par-to-herd{depth=-1}",
"air-par-to-launch{has-air-segment=true}",
"scf-forall-to-for",
Expand All @@ -161,6 +160,6 @@

backend = XRTBackend(
air_loop_fusion=True,
lower_linalg_to_func=True,
lower_linalg_to_func="mm.o",
)
module_function = backend.compile_and_load(air_module)
3 changes: 1 addition & 2 deletions test/xrt/16_gemm_peeling_extern_vec_4x4_bf16_packet/gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,6 @@
+ ",".join(
[
"buffer-results-to-out-params",
"air-linalg-to-func{link-with=mm.o}",
"air-par-to-herd{depth=-1}",
"air-par-to-launch{has-air-segment=true}",
"scf-forall-to-for",
Expand All @@ -161,6 +160,6 @@

backend = XRTBackend(
air_loop_fusion=True,
lower_linalg_to_func=True,
lower_linalg_to_func="mm.o",
)
module_function = backend.compile_and_load(air_module)
3 changes: 1 addition & 2 deletions test/xrt/17_gemm_8x16_transform_vec_4x4/gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@
[
"air-copy-to-dma",
"buffer-results-to-out-params",
"air-linalg-to-func{link-with=mm.o}",
"air-par-to-herd{depth=-1}",
"air-par-to-launch{has-air-segment=true}",
"scf-forall-to-for",
Expand All @@ -138,7 +137,7 @@

backend = XRTBackend(
air_loop_fusion=True,
lower_linalg_to_func=True,
lower_linalg_to_func="mm.o",
runtime_loop_tiling_sizes=[1, 1],
)
module_function = backend.compile_and_load(air_module)
3 changes: 1 addition & 2 deletions test/xrt/18_matmul_8x16_shim_transform_bf16/gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@
+ ",".join(
[
"air-copy-to-dma",
"air-linalg-to-func{link-with=kernel.o}",
"air-par-to-herd{depth=-1}",
"air-par-to-launch{has-air-segment=1}",
"scf-forall-to-for",
Expand All @@ -114,7 +113,7 @@

backend = XRTBackend(
air_loop_fusion=True,
lower_linalg_to_func=True,
lower_linalg_to_func="kernel.o",
runtime_loop_tiling_sizes=[2, 2],
)
module_function = backend.compile_and_load(air_module)
3 changes: 1 addition & 2 deletions test/xrt/25_batch_matmul_bf16/gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,6 @@
+ ",".join(
[
"buffer-results-to-out-params",
"air-linalg-to-func{link-with=mm.o}",
"air-par-to-herd{depth=-1}",
"air-par-to-launch{has-air-segment=true}",
"scf-forall-to-for",
Expand All @@ -160,7 +159,7 @@
###############################################

backend = XRTBackend(
lower_linalg_to_func=True,
lower_linalg_to_func="mm.o",
air_loop_fusion=True,
runtime_loop_tiling_sizes=[1, 1],
)
Expand Down
3 changes: 1 addition & 2 deletions test/xrt/26_vecmat_i8/gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@
+ ",".join(
[
"buffer-results-to-out-params",
"air-linalg-to-func{link-with=vm.o}",
"air-par-to-herd{depth=-1}",
"air-par-to-launch{has-air-segment=true}",
"scf-forall-to-for",
Expand All @@ -122,7 +121,7 @@
###############################################

backend = XRTBackend(
lower_linalg_to_func=True,
lower_linalg_to_func="vm.o",
air_loop_fusion=True,
)
module_function = backend.compile_and_load(air_module)
3 changes: 1 addition & 2 deletions test/xrt/28_gemm_loop_nest_bf16/gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@
+ ",".join(
[
"buffer-results-to-out-params",
"air-linalg-to-func{link-with=mm.o}",
"air-par-to-herd{depth=-1}",
"air-par-to-launch{has-air-segment=true}",
"scf-forall-to-for",
Expand All @@ -123,6 +122,6 @@

backend = XRTBackend(
omit_pingpong=True,
lower_linalg_to_func=True,
lower_linalg_to_func="mm.o",
)
module_function = backend.compile_and_load(air_module)
3 changes: 1 addition & 2 deletions test/xrt/29_gemm_4_level_tiling_extern_vec_4x4_bf16/gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@
+ ",".join(
[
"buffer-results-to-out-params",
"air-linalg-to-func{link-with=mm.o}",
"air-par-to-herd{depth=-1}",
"air-par-to-launch{depth=0 has-air-segment=true}",
"scf-forall-to-for",
Expand All @@ -132,6 +131,6 @@

backend = XRTBackend(
omit_pingpong=True,
lower_linalg_to_func=True,
lower_linalg_to_func="mm.o",
)
module_function = backend.compile_and_load(air_module)

0 comments on commit 122c14c

Please sign in to comment.