For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /max/get-started.md).
Mojo function
get_waves_per_eu
def get_waves_per_eu(depth: Int) -> Int
Return the recommended rocdl.waves_per_eu hint for an AMD MHA kernel.
AMD GCN/CDNA schedulers use this hint to decide how many wavefronts to co-issue per execution unit. Shallow heads (depth 64 or 128) benefit from two waves to hide memory latency, while deeper heads use one wave to conserve register file capacity.
Args:
- depth (
Int): Attention head depth (key/value dimension per head).
Returns:
Int: 2 for depth 64 or 128, 1 otherwise.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!