@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 9e6f61e8c3
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 15, 07:15 UTC

[ROCm][Build] Clean up the ROCm build (#19040)

Signed-off-by: Gregory Shtrasberg <Gregory.Shtrasberg@amd.com>

Gregory Shtrasberg committed Jun 2, 2025 at 23:47 UTC 9e6f61e8c3df833537e4bea6c33f85eca5d73b15
4 files changed +2 -23
CMakeLists.txt
-4
@@ -182,9 +182,6 @@ include(FetchContent)
182 file(MAKE_DIRECTORY ${FETCHCONTENT_BASE_DIR}) # Ensure the directory exists
183 message(STATUS "FetchContent base directory: ${FETCHCONTENT_BASE_DIR}")
184
185 -#
186 -# Set rocm version dev int.
187 -#
185 if(VLLM_GPU_LANG STREQUAL "HIP")
186 #
187 # Overriding the default -O set up by cmake, adding ggdb3 for the most verbose devug info
@@ -192,7 +189,6 @@ if(VLLM_GPU_LANG STREQUAL "HIP")
189 set(CMAKE_${VLLM_GPU_LANG}_FLAGS_DEBUG "${CMAKE_${VLLM_GPU_LANG}_FLAGS_DEBUG} -O0 -ggdb3")
190 set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 -ggdb3")
191
195 -
192 #
193 # Certain HIP functions are marked as [[nodiscard]], yet vllm ignores the result which generates
194 # a lot of warnings that always mask real issues. Suppressing until this is properly addressed.
docker/Dockerfile.rocm
-17
@@ -1,7 +1,5 @@
1 # default base image
2 ARG REMOTE_VLLM="0"
3 -ARG USE_CYTHON="0"
4 -ARG BUILD_RPD="1"
3 ARG COMMON_WORKDIR=/app
4 ARG BASE_IMAGE=rocm/vllm-dev:base
5
@@ -36,12 +34,10 @@ FROM fetch_vllm_${REMOTE_VLLM} AS fetch_vllm
34 # -----------------------
35 # vLLM build stages
36 FROM fetch_vllm AS build_vllm
39 -ARG USE_CYTHON
37 # Build vLLM
38 RUN cd vllm \
39 && python3 -m pip install -r requirements/rocm.txt \
40 && python3 setup.py clean --all \
44 - && if [ ${USE_CYTHON} -eq "1" ]; then python3 tests/build_cython.py build_ext --inplace; fi \
41 && python3 setup.py bdist_wheel --dist-dir=dist
42 FROM scratch AS export_vllm
43 ARG COMMON_WORKDIR
@@ -90,13 +86,6 @@ RUN case "$(which python3)" in \
86 *) ;; esac
87
88 RUN python3 -m pip install --upgrade huggingface-hub[cli]
93 -ARG BUILD_RPD
94 -RUN if [ ${BUILD_RPD} -eq "1" ]; then \
95 - git clone -b nvtx_enabled https://github.com/ROCm/rocmProfileData.git \
96 - && cd rocmProfileData/rpd_tracer \
97 - && pip install -r requirements.txt && cd ../ \
98 - && make && make install \
99 - && cd hipMarker && python3 setup.py install ; fi
89
90 # Install vLLM
91 RUN --mount=type=bind,from=export_vllm,src=/,target=/install \
@@ -117,12 +106,6 @@ ENV TOKENIZERS_PARALLELISM=false
106 # ENV that can improve safe tensor loading, and end-to-end time
107 ENV SAFETENSORS_FAST_GPU=1
108
120 -# User-friendly environment setting for multi-processing to avoid below RuntimeError.
121 -# RuntimeError: Cannot re-initialize CUDA in forked subprocess. To use CUDA with multiprocessing,
122 -# you must use the 'spawn' start method
123 -# See https://pytorch.org/docs/stable/notes/multiprocessing.html#cuda-in-multiprocessing
124 -ENV VLLM_WORKER_MULTIPROC_METHOD=spawn
125 -
109 # Performance environment variable.
110 ENV HIP_FORCE_DEV_KERNARG=1
111
docs/getting_started/installation/gpu/rocm.inc.md
-2
@@ -179,8 +179,6 @@ It is important that the user kicks off the docker build using buildkit. Either
179 It provides flexibility to customize the build of docker image using the following arguments:
180
181 - `BASE_IMAGE`: specifies the base image used when running `docker build`. The default value `rocm/vllm-dev:base` is an image published and maintained by AMD. It is being built using <gh-file:docker/Dockerfile.rocm_base>
182 -- `USE_CYTHON`: An option to run cython compilation on a subset of python files upon docker build
183 -- `BUILD_RPD`: Include RocmProfileData profiling tool in the image
182 - `ARG_PYTORCH_ROCM_ARCH`: Allows to override the gfx architecture values from the base docker image
183
184 Their values can be passed in when running `docker build` with `--build-arg` options.
requirements/rocm.txt
+2
@@ -12,5 +12,7 @@ ray>=2.10.0,<2.45.0
12 peft
13 pytest-asyncio
14 tensorizer>=2.9.0
15 +setuptools-scm>=8
16 +setuptools>=77.0.3,<80.0.0
17 runai-model-streamer==0.11.0
18 runai-model-streamer-s3==0.11.0