Skip to content

Commit

Permalink
Add support for waves_per_eu flag
Browse files Browse the repository at this point in the history
The waves_per_eu flag is a optimization hint
that specifies the minimum number of waves per
execution unit.

Signed-off-by: Harsh Menon <[email protected]>
  • Loading branch information
harsh-nod committed Dec 4, 2024
1 parent d8f0df3 commit 9bdc283
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions iree/turbine/kernel/wave/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -557,6 +557,9 @@ def compile_and_invoke(
"--iree-vm-target-truncate-unsupported-floats",
]

if config.get("waves_per_eu", None) is not None:
flags.append(f"--iree-hip-waves-per-eu={config['waves_per_eu']}")

# TODO: More targets/backends support.
if backend == "rocm":
target = config["target"]
Expand Down
1 change: 1 addition & 0 deletions tests/kernel/wave/wave_evoformer_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ def testEvoformerAttentionForward(
symbols.update(get_default_scheduling_params())

config = get_default_run_config()
config["waves_per_eu"] = 2
if run_bench:
config["benchmark_batch_size"] = 1000
config["benchmark_repetitions"] = 3
Expand Down

0 comments on commit 9bdc283

Please sign in to comment.