-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rocm6.3 fix for docker build and debug option for gpu code #157
Conversation
268fbcc
to
b0cc8cd
Compare
Dockerfile.rocm
Outdated
@@ -25,8 +25,8 @@ ARG ARG_PYTORCH_ROCM_ARCH="gfx90a;gfx942" | |||
ENV PYTORCH_ROCM_ARCH=${ARG_PYTORCH_ROCM_ARCH} | |||
|
|||
# Install some basic utilities | |||
RUN apt-get update && apt-get install python3 python3-pip - | |||
RUN apt-get update && apt-get install -y \ | |||
RUN apt-get update -q -y --force-yes && apt-get install -q -y --force-yes python3 python3-pip - |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The trailing "-" was supposed to be "-y" actually
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hm... didn't know that :) will remove.
cmake/utils.cmake
Outdated
@@ -123,6 +123,11 @@ function (get_torch_gpu_compiler_flags OUT_GPU_FLAGS GPU_LANG) | |||
"-U__HIP_NO_HALF_CONVERSIONS__" | |||
"-U__HIP_NO_HALF_OPERATORS__" | |||
"-fno-gpu-rdc") | |||
|
|||
string(TOUPPER ${CMAKE_BUILD_TYPE} VLLM_BUILD_TYPE) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
set(CMAKE_HIP_FLAGS_DEBUG "${CMAKE_HIP_FLAGS_DEBUG} -O0 -ggdb3")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 -ggdb3")
probably cleaner
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry, but I don't see where FLAGS_DEBUG are used now? Or you mean promote those flags into other places in CMakeLists.txt?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a CMake feature
https://cmake.org/cmake/help/v3.8/variable/CMAKE_LANG_FLAGS_DEBUG.html
Dockerfile.rocm
Outdated
RUN apt-get update && apt-get install python3 python3-pip - | ||
RUN apt-get update && apt-get install -y \ | ||
RUN apt-get update -q -y --force-yes && apt-get install -q -y --force-yes python3 python3-pip - | ||
RUN apt-get update -q -y --force-yes && apt-get install -q -y --force-yes \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want the force-yes? Could be better to catch the future errors that it would mask
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
force-yes means suppress incompatibility and other warning messages. To answer yes to the default apt-get prompt you just need the -y
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a bit concerned about using VLLM_GPU_LANG. Other accelerator compilers may not be clang based. But then again why would they build ROCm/vllm for those, so meh
CMAKE_BUILD_TYPE=Debug python ./setup.py develop <- should produce code that in Rocm GDB can show all variables.
Plus fix for: