Skip to content

Commit

Permalink
testing: (linalg-snitch) change order of incrementally added passes (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
superlopuh authored Aug 1, 2024
1 parent c9f8894 commit edeae99
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
14 changes: 6 additions & 8 deletions tests/transforms/test_test_lower_linalg_to_snitch.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,32 +16,30 @@
(
0,
(
memref_stream_unnest_out_parameters.MemrefStreamUnnestOutParametersPass(),
memref_stream_interleave.MemrefStreamInterleavePass(),
memref_streamify.MemrefStreamifyPass(),
convert_riscv_scf_for_to_frep.ConvertRiscvScfForToFrepPass(),
memref_stream_unnest_out_parameters.MemrefStreamUnnestOutParametersPass(),
memref_streamify.MemrefStreamifyPass(),
),
),
(
1,
(
memref_stream_unnest_out_parameters.MemrefStreamUnnestOutParametersPass(),
memref_stream_interleave.MemrefStreamInterleavePass(),
memref_streamify.MemrefStreamifyPass(),
convert_riscv_scf_for_to_frep.ConvertRiscvScfForToFrepPass(),
memref_stream_unnest_out_parameters.MemrefStreamUnnestOutParametersPass(),
),
),
(
2,
(
memref_stream_unnest_out_parameters.MemrefStreamUnnestOutParametersPass(),
memref_stream_interleave.MemrefStreamInterleavePass(),
convert_riscv_scf_for_to_frep.ConvertRiscvScfForToFrepPass(),
),
),
(
3,
(
memref_stream_unnest_out_parameters.MemrefStreamUnnestOutParametersPass(),
),
(memref_stream_interleave.MemrefStreamInterleavePass(),),
),
(4, ()),
],
Expand Down
8 changes: 6 additions & 2 deletions xdsl/transforms/test_lower_linalg_to_snitch.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,14 @@
)

LINALG_SNITCH_OPTIMIZATION_PASSES: tuple[ModulePass, ...] = (
memref_stream_unnest_out_parameters.MemrefStreamUnnestOutParametersPass(),
# + Unroll and Jam (O4)
memref_stream_interleave.MemrefStreamInterleavePass(),
memref_streamify.MemrefStreamifyPass(),
# + FRep (O3)
convert_riscv_scf_for_to_frep.ConvertRiscvScfForToFrepPass(),
# + Scalar Replacement (O2)
memref_stream_unnest_out_parameters.MemrefStreamUnnestOutParametersPass(),
# + Streams (O1)
memref_streamify.MemrefStreamifyPass(),
)

MAX_OPT_LEVEL = len(LINALG_SNITCH_OPTIMIZATION_PASSES)
Expand Down

0 comments on commit edeae99

Please sign in to comment.