|
| 1 | +##ARG BASE_IMAGE="rocmshared/pytorch-private:ROCm6.2_hipblaslt0.10.0_pytorch2.5_vllm0.6.0" ## Used for sept docker |
| 2 | + |
| 3 | +##For October Docker: |
| 4 | +#ARG BASE_IMAGE="rocmshared/pytorch-private:ROCm6.2_hipblaslt0.10.0_pytorch2.5_vllm0.6.2_cython" |
| 5 | + |
| 6 | +##For Nov Docker: |
| 7 | +ARG BASE_IMAGE="rocm/vllm-dev:20241121" |
| 8 | + |
| 9 | +ARG COMMON_WORKDIR=/app/ |
| 10 | + |
| 11 | +FROM ${BASE_IMAGE} as base |
| 12 | +USER root |
| 13 | + |
| 14 | +WORKDIR ${COMMON_WORKDIR} |
| 15 | + |
| 16 | +COPY ./Dockerfile.moe ${COMMON_WORKDIR} |
| 17 | + |
| 18 | +RUN pip install text_generation==0.7.0 simple_parsing==0.1.5 dashscope==1.18.0 loguru==0.7.2 prettytable==3.10.0 modelscope matplotlib |
| 19 | + |
| 20 | + |
| 21 | +ARG ARG_PYTORCH_ROCM_ARCH="gfx90a;gfx942" |
| 22 | +ENV PYTORCH_ROCM_ARCH=${ARG_PYTORCH_ROCM_ARCH} |
| 23 | + |
| 24 | + |
| 25 | +ARG VLLM_REPO="https://github.com/ROCm/vllm.git" |
| 26 | +ARG VLLM_BRANCH="moe_final_v0.6.0_Nov19" |
| 27 | +ARG REPO_NAME="rocm_vllm" |
| 28 | +RUN pip uninstall -y vllm \ |
| 29 | + && git clone ${VLLM_REPO} ${REPO_NAME}\ |
| 30 | + && cd ${REPO_NAME} \ |
| 31 | + && git checkout ${VLLM_BRANCH} \ |
| 32 | + && python3 setup.py develop \ |
| 33 | + && python3 setup_cython.py build_ext --inplace |
| 34 | + |
| 35 | +WORKDIR ${COMMON_WORKDIR} |
| 36 | + |
| 37 | +ARG TRITON_REPO="https://github.com/ROCm/triton.git" |
| 38 | +ARG TRITON_BRANCH="shared/triton-moe-opt" |
| 39 | +RUN pip uninstall -y triton \ |
| 40 | + && git clone ${TRITON_REPO} \ |
| 41 | + && cd triton \ |
| 42 | + && git checkout ${TRITON_BRANCH} \ |
| 43 | + && cd python \ |
| 44 | + && pip install . |
| 45 | + |
| 46 | + |
| 47 | +ENV TORCH_BLAS_PREFER_HIPBLASLT=1 |
| 48 | +ENV VLLM_USE_ROCM_CUSTOM_PAGED_ATTN=1 |
| 49 | +ENV HIP_FORCE_DEV_KERNARG=1 |
| 50 | +ENV VLLM_USE_TRITON_FLASH_ATTN=0 |
| 51 | +ENV FUSED_MOE_PERSISTENT=1 |
| 52 | +ENV VLLM_MOE_PADDING=128 |
| 53 | +ENV VLLM_MOE_SHUFFLE=1 |
| 54 | +ENV TRITON_HIP_USE_NEW_STREAM_PIPELINE=1 |
| 55 | +ENV VLLM_SCHED_PREFILL_COUNT=0 |
| 56 | +ENV HIP_VISISBLE_DEVICES=0,1,2,3,4,5,6,7 |
| 57 | + |
| 58 | +## --- Notes (Nov19) --- |
| 59 | +# Add fp8 moe support for bypassLDS and Padding |
| 60 | +# Fp16 padding updated to the "new way". Similar to fp8 padding |
| 61 | +# Fixed moe tuning space for fp8 |
| 62 | +# Moe tuned configs for fp8 & fp16 with num_stages=2 |
| 63 | + |
| 64 | +## --- Notes (Oct3) --- |
| 65 | +# Replace torch.sum with moe_sum hip kernel |
| 66 | +# Increase max_seq_len_to_capture=32K to enable graph capture on longer prompt size |
| 67 | +# For TTFT calc: use --enforce-eager to avoid extra 'decode' from the async output processing |
| 68 | +# For TPOT calc: Either disable async process or account for the extra decode accordingly |
| 69 | + |
| 70 | + |
| 71 | +## --- Notes (Sept24) --- |
| 72 | +# Disabled rocm partially supported warning |
| 73 | +# Added warning log if moe tuned config is not picked by vllm |
| 74 | +# Added MI300X_OAM tuned files (mi300 80cu as mi308) |
| 75 | +# Added cython build |
0 commit comments