Skip to content

[ROCm] Use -rpath-link to fix libtinfo conflict#83552

Closed
jithunnair-amd wants to merge 3 commits intopytorch:masterfrom
jithunnair-amd:fix_for_libtinfo6
Closed

[ROCm] Use -rpath-link to fix libtinfo conflict#83552
jithunnair-amd wants to merge 3 commits intopytorch:masterfrom
jithunnair-amd:fix_for_libtinfo6

Conversation

@jithunnair-amd
Copy link
Collaborator

@jithunnair-amd jithunnair-amd commented Aug 16, 2022

Fixes issue building PyTorch for ROCm5.3 and above on Ubuntu20.04 because libtinfo6 from conda conflicts with the one from the distro causing symbol not found errors.

Some more context here: ROCm#1058 (comment)

cc @jeffdaily @sunway513 @ROCmSupport

@pytorch-bot pytorch-bot bot added the module: rocm AMD GPU support for Pytorch label Aug 16, 2022
@facebook-github-bot
Copy link
Contributor

facebook-github-bot commented Aug 16, 2022

🔗 Helpful links

✅ No Failures (0 Pending)

As of commit 836b07cb23 (more details on the Dr. CI page):

Expand to see more

💚 💚 Looks good so far! There are no failures yet. 💚 💚


This comment was automatically generated by Dr. CI (expand for details).

Please report bugs/suggestions to the (internal) Dr. CI Users group.

Click here to manually regenerate this comment.

@jithunnair-amd
Copy link
Collaborator Author

cc @jaglinux

@ngimel ngimel requested a review from malfet August 24, 2022 20:13
@ngimel ngimel added the triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module label Aug 24, 2022
@jithunnair-amd
Copy link
Collaborator Author

@pytorchbot rebase

@pytorchmergebot
Copy link
Collaborator

@pytorchbot successfully started a rebase job. Check the current status here

@pytorchmergebot
Copy link
Collaborator

Successfully rebased fix_for_libtinfo6 onto refs/remotes/origin/master, please pull locally before adding more changes (for example, via git checkout fix_for_libtinfo6 && git pull --rebase)

@pytorch-bot
Copy link

pytorch-bot bot commented Sep 12, 2022

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/83552

Note: Links to docs will display an error until the docs builds have been completed.

❌ 1 Failures, 6 Pending

As of commit ef86b50:

The following jobs have failed:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

Copy link
Contributor

@malfet malfet left a comment

Choose a reason for hiding this comment

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

Looks fine, though it would be nice to use python (or even CMAKE command)

@facebook-github-bot
Copy link
Contributor

/easycla

As part of the transition to the PyTorch Foundation, this project now requires contributions be covered under the new CLA. See #85559 for additional details.

This comment will trigger a new check of this PR. If you are already covered, you will simply see a new "EasyCLA" check that passes. If you are not covered, a bot will leave a new comment with a link to sign.

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Oct 4, 2022

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: jithunnair-amd / name: Jithun Nair (0930c0ce326cf4666bb72b0b68661aefe5fe2787, 956ade57e16f893a556408620949a24931510958)

@jithunnair-amd
Copy link
Collaborator Author

@pytorchbot rebase

@pytorchmergebot
Copy link
Collaborator

@pytorchbot successfully started a rebase job. Check the current status here

@pytorchmergebot
Copy link
Collaborator

Tried to rebase and push PR #83552, but it was already up to date

@kit1980
Copy link
Contributor

kit1980 commented Oct 25, 2022

@pytorchbot rebase

@kit1980
Copy link
Contributor

kit1980 commented Oct 25, 2022

@jithunnair-amd should we merge this?

@pytorchmergebot
Copy link
Collaborator

@pytorchbot successfully started a rebase job. Check the current status here

@pytorchmergebot
Copy link
Collaborator

Successfully rebased fix_for_libtinfo6 onto refs/remotes/origin/viable/strict, please pull locally before adding more changes (for example, via git checkout fix_for_libtinfo6 && git pull --rebase)

@jithunnair-amd
Copy link
Collaborator Author

@pytorchbot merge

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

@malfet
Copy link
Contributor

malfet commented Oct 26, 2022

The error on ios/macos build is

2022-10-26T14:58:27.6760830Z CMake Error at cmake/Dependencies.cmake:1276 (file):
2022-10-26T14:58:27.6761450Z   file STRINGS file "/etc/os-release" cannot be read.

But how? Is USE_ROCM true on MacOS/iOS somehow? Or a merge conflict? (Also, I've realized that PR is old enough not to have an automated ciflow/trunk label on review)

@malfet malfet reopened this Oct 26, 2022
@malfet malfet added the ciflow/trunk Trigger trunk jobs on your pull request label Oct 26, 2022
@kit1980
Copy link
Contributor

kit1980 commented Oct 26, 2022

The error on ios/macos build is

2022-10-26T14:58:27.6760830Z CMake Error at cmake/Dependencies.cmake:1276 (file):
2022-10-26T14:58:27.6761450Z   file STRINGS file "/etc/os-release" cannot be read.

But how? Is USE_ROCM true on MacOS/iOS somehow? Or a merge conflict? (Also, I've realized that PR is old enough not to have an automated ciflow/trunk label on review)

I'm curious how also. Maybe cmake does some kind of static analysis before running, don't know...

@malfet
Copy link
Contributor

malfet commented Oct 27, 2022

I'm curious how also. Maybe cmake does some kind of static analysis before running, don't know...
No, cmake is a very simple tool, answer is that ROCM is always enabled unless disabled explicitly:

option(USE_ROCM "Use ROCm" ON)

@kit1980
Copy link
Contributor

kit1980 commented Oct 27, 2022

Should it be disabled by default instead?

@jithunnair-amd
Copy link
Collaborator Author

Should it be disabled by default instead?

@malfet @kit1980 I don't think that should be necessary. My latest change (simple file-exists check) seems to have fixed the macOS/iOS failures. The 1 failure for linux-bionic-py3_7-clang8-xla / test seems unrelated.

Copy link
Collaborator

@pruthvistony pruthvistony left a comment

Choose a reason for hiding this comment

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

This change is backward compatible with older versions of ROCm.

@kit1980
Copy link
Contributor

kit1980 commented Oct 28, 2022

@jithunnair-amd - PR is merged #87833
So your last commit ef86b50 is no longer needed. You can remove it and merge again.

@malfet
Copy link
Contributor

malfet commented Oct 28, 2022

@pytorchbot merge -f "XLA failures are unrelated"

if(USE_ROCM)
# This prevents linking in the libtinfo from /opt/conda/lib which conflicts with ROCm libtinfo.
# Currently only active for Ubuntu 20.04 and greater versions.
if(UNIX AND EXISTS "/etc/os-release")
Copy link
Contributor

Choose a reason for hiding this comment

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

Didn't know that LINUX environment variable has only been added in cmake-3.25, though in PyTorch CMake file it has long been defined (as UNIX check would return true even for CygWin)

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

@github-actions
Copy link
Contributor

Hey @jithunnair-amd.
You've committed this PR, but it does not have both a 'release notes: ...' and 'topics: ...' label. Please add one of each to the PR. The 'release notes: ...' label should represent the part of PyTorch that this PR changes (fx, autograd, distributed, etc) and the 'topics: ...' label should represent the kind of PR it is (not user facing, new feature, bug fix, perf improvement, etc). The list of valid labels can be found here for the 'release notes: ...' and here for the 'topics: ...'.
For changes that are 'topic: not user facing' there is no need for a release notes label.

@kit1980 kit1980 removed the Reverted label Oct 29, 2022
kulinseth pushed a commit to kulinseth/pytorch that referenced this pull request Nov 5, 2022
Fixes issue building PyTorch for ROCm5.3 and above on Ubuntu20.04 because libtinfo6 from conda conflicts with the one from the distro causing symbol not found errors.

Pull Request resolved: pytorch#83552
Approved by: https://github.com/malfet
kulinseth pushed a commit to kulinseth/pytorch that referenced this pull request Nov 5, 2022
kulinseth pushed a commit to kulinseth/pytorch that referenced this pull request Nov 5, 2022
Fixes issue building PyTorch for ROCm5.3 and above on Ubuntu20.04 because libtinfo6 from conda conflicts with the one from the distro causing symbol not found errors.

cc @jeffdaily @sunway513 @ROCmSupport
Pull Request resolved: pytorch#83552
Approved by: https://github.com/malfet, https://github.com/pruthvistony
jithunnair-amd added a commit to ROCm/pytorch that referenced this pull request Nov 22, 2022
Fixes issue building PyTorch for ROCm5.3 and above on Ubuntu20.04 because libtinfo6 from conda conflicts with the one from the distro causing symbol not found errors.

cc @jeffdaily @sunway513 @ROCmSupport
Pull Request resolved: pytorch#83552
Approved by: https://github.com/malfet, https://github.com/pruthvistony
kulinseth pushed a commit to kulinseth/pytorch that referenced this pull request Dec 10, 2022
Fixes issue building PyTorch for ROCm5.3 and above on Ubuntu20.04 because libtinfo6 from conda conflicts with the one from the distro causing symbol not found errors.

Pull Request resolved: pytorch#83552
Approved by: https://github.com/malfet
kulinseth pushed a commit to kulinseth/pytorch that referenced this pull request Dec 10, 2022
kulinseth pushed a commit to kulinseth/pytorch that referenced this pull request Dec 10, 2022
Fixes issue building PyTorch for ROCm5.3 and above on Ubuntu20.04 because libtinfo6 from conda conflicts with the one from the distro causing symbol not found errors.

cc @jeffdaily @sunway513 @ROCmSupport
Pull Request resolved: pytorch#83552
Approved by: https://github.com/malfet, https://github.com/pruthvistony
jeffdaily pushed a commit to ROCm/pytorch that referenced this pull request Jan 3, 2023
Fixes issue building PyTorch for ROCm5.3 and above on Ubuntu20.04 because libtinfo6 from conda conflicts with the one from the distro causing symbol not found errors.

cc @jeffdaily @sunway513 @ROCmSupport
Pull Request resolved: pytorch#83552
Approved by: https://github.com/malfet, https://github.com/pruthvistony
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/trunk Trigger trunk jobs on your pull request cla signed Merged module: rocm AMD GPU support for Pytorch open source triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants