[AMD] Update aiter version for v41 (#42023)
This commit is contained in:
+17
-30
@@ -61,7 +61,7 @@ ENV BUILD_TRITON="0"
|
||||
ENV BUILD_LLVM="0"
|
||||
ENV BUILD_AITER_ALL="1"
|
||||
ENV BUILD_MOONCAKE="1"
|
||||
ENV AITER_COMMIT_DEFAULT="acf8fdf9307431ece8ee275971c41cb3d1a7020b"
|
||||
ENV AITER_COMMIT_DEFAULT="e7d2453f25e5aaeea72a3a40b284ba453e026624"
|
||||
|
||||
# ===============================
|
||||
# Base image 942 with rocm720 and args
|
||||
@@ -71,7 +71,7 @@ ENV BUILD_TRITON="1"
|
||||
ENV BUILD_LLVM="0"
|
||||
ENV BUILD_AITER_ALL="1"
|
||||
ENV BUILD_MOONCAKE="1"
|
||||
ENV AITER_COMMIT_DEFAULT="acf8fdf9307431ece8ee275971c41cb3d1a7020b"
|
||||
ENV AITER_COMMIT_DEFAULT="e7d2453f25e5aaeea72a3a40b284ba453e026624"
|
||||
ENV TRITON_COMMIT_DEFAULT="42270451990532c67e69d753fbd026f28fcc4840"
|
||||
|
||||
# ===============================
|
||||
@@ -82,7 +82,7 @@ ENV BUILD_TRITON="1"
|
||||
ENV BUILD_LLVM="0"
|
||||
ENV BUILD_AITER_ALL="1"
|
||||
ENV BUILD_MOONCAKE="1"
|
||||
ENV AITER_COMMIT_DEFAULT="acf8fdf9307431ece8ee275971c41cb3d1a7020b"
|
||||
ENV AITER_COMMIT_DEFAULT="e7d2453f25e5aaeea72a3a40b284ba453e026624"
|
||||
# Pin the ROCm torch stack for every pip invocation in this flavor. The file is
|
||||
# filled in after the torch 2.11 upgrade below; it must already exist (empty is
|
||||
# valid) because pip reads PIP_CONSTRAINT from the first pip call onwards.
|
||||
@@ -106,7 +106,7 @@ ENV BUILD_TRITON="0"
|
||||
ENV BUILD_LLVM="0"
|
||||
ENV BUILD_AITER_ALL="1"
|
||||
ENV BUILD_MOONCAKE="1"
|
||||
ENV AITER_COMMIT_DEFAULT="acf8fdf9307431ece8ee275971c41cb3d1a7020b"
|
||||
ENV AITER_COMMIT_DEFAULT="e7d2453f25e5aaeea72a3a40b284ba453e026624"
|
||||
|
||||
# ===============================
|
||||
# Base image 950 with rocm720 and args
|
||||
@@ -116,7 +116,7 @@ ENV BUILD_TRITON="1"
|
||||
ENV BUILD_LLVM="0"
|
||||
ENV BUILD_AITER_ALL="1"
|
||||
ENV BUILD_MOONCAKE="1"
|
||||
ENV AITER_COMMIT_DEFAULT="acf8fdf9307431ece8ee275971c41cb3d1a7020b"
|
||||
ENV AITER_COMMIT_DEFAULT="e7d2453f25e5aaeea72a3a40b284ba453e026624"
|
||||
ENV TRITON_COMMIT_DEFAULT="42270451990532c67e69d753fbd026f28fcc4840"
|
||||
|
||||
# ===============================
|
||||
@@ -127,7 +127,7 @@ ENV BUILD_TRITON="1"
|
||||
ENV BUILD_LLVM="0"
|
||||
ENV BUILD_AITER_ALL="1"
|
||||
ENV BUILD_MOONCAKE="1"
|
||||
ENV AITER_COMMIT_DEFAULT="acf8fdf9307431ece8ee275971c41cb3d1a7020b"
|
||||
ENV AITER_COMMIT_DEFAULT="e7d2453f25e5aaeea72a3a40b284ba453e026624"
|
||||
# Pin the ROCm torch stack for every pip invocation in this flavor. The file is
|
||||
# filled in after the torch 2.11 upgrade below; it must already exist (empty is
|
||||
# valid) because pip reads PIP_CONSTRAINT from the first pip call onwards.
|
||||
@@ -286,7 +286,7 @@ ENV BUILD_TRITON="0"
|
||||
ENV BUILD_LLVM="0"
|
||||
ENV BUILD_AITER_ALL="1"
|
||||
ENV BUILD_MOONCAKE="1"
|
||||
ENV AITER_COMMIT_DEFAULT="acf8fdf9307431ece8ee275971c41cb3d1a7020b"
|
||||
ENV AITER_COMMIT_DEFAULT="e7d2453f25e5aaeea72a3a40b284ba453e026624"
|
||||
# Same reasoning as the rocm724 stages: keep pip from resolving the image's
|
||||
# ROCm torch away to a PyPI CUDA build. Populated after the stack is in place.
|
||||
ENV PIP_CONSTRAINT="/etc/sglang/constraints/torch-rocm.txt"
|
||||
@@ -300,7 +300,7 @@ ENV BUILD_TRITON="0"
|
||||
ENV BUILD_LLVM="0"
|
||||
ENV BUILD_AITER_ALL="1"
|
||||
ENV BUILD_MOONCAKE="1"
|
||||
ENV AITER_COMMIT_DEFAULT="acf8fdf9307431ece8ee275971c41cb3d1a7020b"
|
||||
ENV AITER_COMMIT_DEFAULT="e7d2453f25e5aaeea72a3a40b284ba453e026624"
|
||||
ENV PIP_CONSTRAINT="/etc/sglang/constraints/torch-rocm.txt"
|
||||
RUN mkdir -p /etc/sglang/constraints && : > /etc/sglang/constraints/torch-rocm.txt
|
||||
|
||||
@@ -568,13 +568,19 @@ RUN pip uninstall -y aiter
|
||||
# block AITER_COMMIT overrides that predate that rule. The working tree was just
|
||||
# produced by a fresh `git clone` above, so there are no real user changes to
|
||||
# preserve.
|
||||
# cherry pick ROCm/aiter#5283 and #5279 gfx950 dsv4 a8w8 blockscale bpreshuffle configs
|
||||
# cherry pick ROCm/aiter#6042 to unpeel the 64-bit sparse MLA loop below Triton 3.8, may be removed in next aiter upgrade
|
||||
# apply the DSV4.1 TP2 fp8/fp4 FMoE tuning CSVs from ROCm/aiter#5967, may be removed in next aiter upgrade
|
||||
# apply fix for v4 fp4 indexer, may be removed in next aiter upgrade
|
||||
RUN git clone ${AITER_REPO} \
|
||||
&& cd aiter \
|
||||
&& git checkout -f ${AITER_COMMIT} \
|
||||
&& git cherry-pick --no-commit 7b481fbcaf834ce98b66004ea329c2ca2bba87d7 \
|
||||
&& git cherry-pick --no-commit 24a62b1c122f23645a19b9d8b0abd4750c59359b \
|
||||
&& git fetch origin pull/6042/head \
|
||||
&& git cherry-pick --no-commit 042a289183e5b47e193df6c10160915a6e8b69f5 \
|
||||
&& git fetch origin pull/5967/head \
|
||||
&& git diff -U0 89a47b84ac4b576339a50047e290c383c2377389 2bd147293d887c91fd10da10b1dbbf4690844270 -- \
|
||||
aiter/configs/model_configs/dsv41_fp4_tuned_fmoe.csv \
|
||||
aiter/configs/model_configs/dsv41_fp4_untuned_fmoe.csv \
|
||||
| git apply --unidiff-zero \
|
||||
&& sed -i 's/from functools import lru_cache/from functools import cache/' aiter/ops/flydsl/kernels/mqa_logits/pa_mqa_logits_fp4_prefill.py \
|
||||
&& sed -i 's/@lru_cache(maxsize=32)/@cache/' aiter/ops/flydsl/kernels/mqa_logits/pa_mqa_logits_fp4_prefill.py \
|
||||
&& git submodule update --init --recursive \
|
||||
@@ -592,25 +598,6 @@ COPY --from=local_src \
|
||||
/src/python/sglang/kernels/ops/attention/dsv4/asm/gfx950/mla_v4/mla_a8w8_qh64_qseqlen1_gqaratio64_nm.co \
|
||||
/sgl-workspace/aiter/hsa/gfx950/mla_v4/
|
||||
|
||||
# The pinned AITER revision uses std::optional in topk_per_row_kernels.cu without
|
||||
# including <optional>: ROCm/aiter#4702 removed the torch headers that previously
|
||||
# supplied it transitively. ROCm 7.0 therefore fails module_top_k_per_row, while
|
||||
# ROCm 7.2 toolchains still obtain <optional> from another header.
|
||||
# GPU_ARCH keeps the full selected stage name; only unsuffixed gfx942/gfx950
|
||||
# denote ROCm 7.0, while newer flavors carry a -rocm... suffix. Remove this
|
||||
# backport once AITER_COMMIT contains the upstream fix from ROCm/aiter#4853.
|
||||
RUN python3 <<'PY'
|
||||
import os
|
||||
from pathlib import Path
|
||||
|
||||
p = Path("/sgl-workspace/aiter/csrc/kernels/topk_per_row_kernels.cu")
|
||||
anchor = "#include <type_traits>\n"
|
||||
if os.environ["GPU_ARCH"] in {"gfx942", "gfx950"} and p.exists():
|
||||
s = p.read_text()
|
||||
if "std::optional" in s and "#include <optional>" not in s and anchor in s:
|
||||
p.write_text(s.replace(anchor, "#include <optional>\n" + anchor, 1))
|
||||
PY
|
||||
|
||||
RUN cd aiter \
|
||||
&& echo "[AITER] GPU_ARCH=${GPU_ARCH}" \
|
||||
&& echo "[AITER] AITER_USE_SYSTEM_TRITON=${AITER_USE_SYSTEM_TRITON}" \
|
||||
|
||||
Reference in New Issue
Block a user