-
Notifications
You must be signed in to change notification settings - Fork 75
[rocm6.3_internal_testing] Changes to support UB 24.04 build #1633
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
Changes from all commits
66412eb
ec1b230
a0126a2
e8ec496
2b39e58
943377a
df60210
ebca049
243f1f9
d98825f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -123,6 +123,10 @@ fi | |
| conda_install_through_forge libstdcxx-ng=12 | ||
| fi | ||
|
|
||
| if [ "$ANACONDA_PYTHON_VERSION" = "3.12" ] || [ "$UBUNTU_VERSION" == "24.04"* ] ; then | ||
| conda_install_through_forge libstdcxx-ng=14 | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is the libstdcxx-ng version dependent on Ubuntu version or python version? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If I recall correctly this is the lowest available for ub24, python doesn't have a strict requirement for this version. But I'm not 100% sure, worked on this some time ago.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sounds like at the minimum, this condition needs to be on OS version. I assume the reason is similar to pytorch#121556 where we get symbol version errors when building PyTorch?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is dependent on UB 24.04 and minimum python version is 3.12, so I will update the condition.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Updated the condition. |
||
| fi | ||
|
|
||
| # Install some other packages, including those needed for Python test reporting | ||
| pip_install -r /opt/conda/requirements-ci.txt | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,6 +16,11 @@ install_ubuntu() { | |
| # gpg-agent is not available by default on 20.04 | ||
| apt-get install -y --no-install-recommends gpg-agent | ||
| fi | ||
| if [[ $UBUNTU_VERSION == 24.04 ]]; then | ||
| apt-get install -y --no-install-recommends gpg-agent | ||
| echo -e 'Package: *\nPin: release o=repo.radeon.com\nPin-Priority: 600' \ | ||
| | sudo tee /etc/apt/preferences.d/rocm-pin-600 | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. According to DevOps, this is needed for Ubuntu 22.04 onwards (as also confirmed by https://github.com/ROCm/ROCm-docker/blob/master/build_all.sh). So we should:
|
||
| fi | ||
| apt-get install -y kmod | ||
| apt-get install -y wget | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,6 +2,13 @@ | |
|
|
||
| set -ex | ||
|
|
||
| # Since version 24 the system ships with user 'ubuntu' that has id 1000 | ||
| # We need a work-around to enable id 1000 usage for this script | ||
| if [[ $UBUNTU_VERSION == 24.04 ]]; then | ||
| # touch is used to disable harmless error message | ||
| touch /var/mail/ubuntu && chown ubuntu /var/mail/ubuntu && userdel -r ubuntu | ||
| fi | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This would seem to be a problem for upstream PyTorch as well. Can we file an upstream GitHub issue with logs and error snippets so that they're aware of this and might come up with a different way to address this? It's okay to merge this patch in rocm6.3_internal_testing though.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @iupaikov-amd Can you please file a github issue on pytorch/pytorch for this? Upstream PyTorch team would like some more details. Please discuss with Pruthvi or me if you have questions regarding what info to mention on the issue. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Upstream issue about install_user.sh: pytorch#138812 |
||
|
|
||
| # Mirror jenkins user in container | ||
| # jenkins user as ec2-user should have the same user-id | ||
| echo "jenkins:x:1000:1000::/var/lib/jenkins:" >> /etc/passwd | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -606,7 +606,7 @@ if(USE_ROCM) | |
| # caffe2_nvrtc's stubs to driver APIs are useful for HIP. | ||
| # See NOTE [ ATen NVRTC Stub and HIP ] | ||
| add_library(caffe2_nvrtc SHARED ${ATen_NVRTC_STUB_SRCS}) | ||
| target_link_libraries(caffe2_nvrtc ${PYTORCH_HIP_LIBRARIES} ${ROCM_HIPRTC_LIB}) | ||
| target_link_libraries(caffe2_nvrtc ${PYTORCH_HIP_LIBRARIES} ${ROCM_HIPRTC_LIB} ${ROCM_HSART_LIB}) | ||
| target_include_directories(caffe2_nvrtc PRIVATE ${CMAKE_BINARY_DIR}) | ||
| target_compile_definitions(caffe2_nvrtc PRIVATE USE_ROCM __HIP_PLATFORM_AMD__) | ||
| install(TARGETS caffe2_nvrtc DESTINATION "${TORCH_INSTALL_LIB_DIR}") | ||
|
|
@@ -1417,6 +1417,7 @@ target_link_libraries(torch_cpu PUBLIC c10) | |
| target_link_libraries(torch_cpu PUBLIC ${Caffe2_PUBLIC_DEPENDENCY_LIBS}) | ||
| target_link_libraries(torch_cpu PRIVATE ${Caffe2_DEPENDENCY_LIBS}) | ||
| target_link_libraries(torch_cpu PRIVATE ${Caffe2_DEPENDENCY_WHOLE_LINK_LIBS}) | ||
| target_link_libraries(torch_cpu PUBLIC ${ROCM_HSART_LIB}) | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The other ROCM_HSART_LIB usages seem like they should be avoidable as well, but this one seems the most egregious, being a torch_cpu dependency? I wonder if @naromero77amd's latest refactor in https://github.com/pytorch/pytorch/pull/137112/files might help with all the ROCM_HSART_LIB occurrences because it uses CMake targets instead of paths to .so files.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @jithunnair-amd , root@ctr-ubbsmc12:/var/lib/jenkins/pytorch/build/lib# ldd libtorch_cpu.so |
||
| if(USE_MPI) | ||
| target_link_libraries(torch_cpu PRIVATE MPI::MPI_CXX) | ||
| endif() | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.