Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import torch
import triton
import triton.language as tl
from triton import knobs
from typing import Literal, Optional
from .common import compute_alibi_block, compute_fp8_scaling_factors, apply_rotary
from .utils import (
Expand All @@ -14,6 +15,15 @@
remap_xcd,
)

# gfx1151 (Strix Halo / RDNA3.5): enable Triton's in-thread transpose for the
# prefill FMHA kernels. It is only enabled by default for gfx1151 on Triton's
# main branch (the upcoming 3.8); the Triton version in use here still gates it
# to gfx942, so enable it explicitly. It is a consistent win (e.g. ~11% faster
# on ViT-style d=72, sq=sk>=3200 shapes). Only set it when the user has not made
# an explicit choice via TRITON_HIP_USE_IN_THREAD_TRANSPOSE.
if knobs.amd.use_in_thread_transpose is None and get_arch().name == "gfx1151":
knobs.amd.use_in_thread_transpose = True

FWD_PREFILL_AUTOTUNE_KEYS = [
"IS_CAUSAL",
"dropout_p",
Expand Down