Skip to content
Merged
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
8 changes: 4 additions & 4 deletions docker/rocm.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ ENV BUILD_TRITON="0"
ENV BUILD_LLVM="0"
ENV BUILD_AITER_ALL="1"
ENV BUILD_MOONCAKE="1"
ENV AITER_COMMIT_DEFAULT="46e6c92b3eb33f64823aaa1ff39a14586b059ef5"
ENV AITER_COMMIT_DEFAULT="6740fb7911db231e6eadad45194ad6713d25f9fb"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The environment variable AITER_COMMIT_DEFAULT is duplicated across all four base image stages (lines 34, 44, 54, and 64). This duplication makes updates error-prone and harder to maintain.

Consider defining AITER_COMMIT_DEFAULT once as a global ARG at the top of the Dockerfile (before the first FROM instruction) and then referencing it in the final stage. This allows you to manage the default commit in a single place.

Suggested Refactoring

  1. At the very top of the Dockerfile (before the first FROM):
ARG AITER_COMMIT_DEFAULT="6740fb7911db231e6eadad45194ad6713d25f9fb"
  1. In the final stage (around line 86):
ARG AITER_COMMIT_DEFAULT
ARG AITER_COMMIT=""
ENV AITER_COMMIT="${AITER_COMMIT:-${AITER_COMMIT_DEFAULT}}"
  1. Remove the ENV AITER_COMMIT_DEFAULT lines from the base stages (gfx942, gfx942-rocm720, gfx950, and gfx950-rocm720).


# ===============================
# Base image 942 with rocm720 and args
Expand All @@ -41,7 +41,7 @@ ENV BUILD_TRITON="1"
ENV BUILD_LLVM="0"
ENV BUILD_AITER_ALL="1"
ENV BUILD_MOONCAKE="1"
ENV AITER_COMMIT_DEFAULT="46e6c92b3eb33f64823aaa1ff39a14586b059ef5"
ENV AITER_COMMIT_DEFAULT="6740fb7911db231e6eadad45194ad6713d25f9fb"

# ===============================
# Base image 950 and args
Expand All @@ -51,7 +51,7 @@ ENV BUILD_TRITON="0"
ENV BUILD_LLVM="0"
ENV BUILD_AITER_ALL="1"
ENV BUILD_MOONCAKE="1"
ENV AITER_COMMIT_DEFAULT="46e6c92b3eb33f64823aaa1ff39a14586b059ef5"
ENV AITER_COMMIT_DEFAULT="6740fb7911db231e6eadad45194ad6713d25f9fb"

# ===============================
# Base image 950 with rocm720 and args
Expand All @@ -61,7 +61,7 @@ ENV BUILD_TRITON="1"
ENV BUILD_LLVM="0"
ENV BUILD_AITER_ALL="1"
ENV BUILD_MOONCAKE="1"
ENV AITER_COMMIT_DEFAULT="46e6c92b3eb33f64823aaa1ff39a14586b059ef5"
ENV AITER_COMMIT_DEFAULT="6740fb7911db231e6eadad45194ad6713d25f9fb"

# ===============================
# Chosen arch and args
Expand Down
Loading