Skip to content
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

Delay loading the cuda library on Windows #37811

Closed
wants to merge 4 commits into from

Conversation

peterjc123
Copy link
Collaborator

so we can import torch compiled with cuda on a CPU-only machine.
need tests

@peterjc123 peterjc123 requested review from ezyang and malfet May 5, 2020 04:54
@dr-ci
Copy link

dr-ci bot commented May 5, 2020

💊 Build failures summary and remediations

As of commit 2e9f988 (more details on the Dr. CI page):


  • 2/2 failures introduced in this PR

🕵️ 2 new failures recognized by patterns

The following build failures do not appear to be due to upstream breakages:

See CircleCI build pytorch_linux_xenial_py3_6_gcc5_4_build (1/2)

Step: "(Optional) Merge target branch" (full log | diagnosis details | 🔁 rerun)

Automatic merge failed; fix conflicts and then commit the result.
CONFLICT (add/add): Merge conflict in .circleci/verbatim-sources/pytorch-job-specs.yml 
Auto-merging .circleci/verbatim-sources/pytorch-job-specs.yml 
CONFLICT (add/add): Merge conflict in .circleci/verbatim-sources/job-specs-custom.yml 
Auto-merging .circleci/verbatim-sources/job-specs-custom.yml 
CONFLICT (add/add): Merge conflict in .circleci/scripts/setup_ci_environment.sh 
Auto-merging .circleci/scripts/setup_ci_environment.sh 
CONFLICT (add/add): Merge conflict in .circleci/config.yml 
Auto-merging .circleci/config.yml 
CONFLICT (add/add): Merge conflict in .circleci/cimodel/data/pytorch_build_definitions.py 
Auto-merging .circleci/cimodel/data/pytorch_build_definitions.py 
Automatic merge failed; fix conflicts and then commit the result. 

See CircleCI build pytorch_xla_linux_bionic_py3_6_clang9_build (2/2)

Step: "(Optional) Merge target branch" (full log | diagnosis details | 🔁 rerun)

Automatic merge failed; fix conflicts and then commit the result.
CONFLICT (add/add): Merge conflict in .circleci/verbatim-sources/pytorch-job-specs.yml 
Auto-merging .circleci/verbatim-sources/pytorch-job-specs.yml 
CONFLICT (add/add): Merge conflict in .circleci/verbatim-sources/job-specs-custom.yml 
Auto-merging .circleci/verbatim-sources/job-specs-custom.yml 
CONFLICT (add/add): Merge conflict in .circleci/scripts/setup_ci_environment.sh 
Auto-merging .circleci/scripts/setup_ci_environment.sh 
CONFLICT (add/add): Merge conflict in .circleci/config.yml 
Auto-merging .circleci/config.yml 
CONFLICT (add/add): Merge conflict in .circleci/cimodel/data/pytorch_build_definitions.py 
Auto-merging .circleci/cimodel/data/pytorch_build_definitions.py 
Automatic merge failed; fix conflicts and then commit the result. 

This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.

Please report bugs/suggestions on the GitHub issue tracker.

See how this bot performed.

This comment has been revised 9 times.

@malfet
Copy link
Contributor

malfet commented May 5, 2020

Aren't nvrtc designed to dynamically depend on CUDA?
It feels strange to solve it only Windows users

@peterjc123
Copy link
Collaborator Author

peterjc123 commented May 5, 2020

@malfet Symbols on Linux are resolved lazily by default. That's why importing a cuda version of torch on a CPU-only machine doesn't fail.

@mruberry mruberry added module: build Build system issues triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module labels May 5, 2020
@ezyang
Copy link
Contributor

ezyang commented May 5, 2020

Wish we could test this. Maybe it wouldn't be too hard to do on CircleCI? We do a similar test on Linux, loading a CUDA binary on CPU and then running tests, it has caught bugs.

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@ezyang is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@ezyang merged this pull request in 0359a9b.

facebook-github-bot pushed a commit that referenced this pull request May 8, 2020
Summary:
Targets #37811 (comment).
Pull Request resolved: #37904

Differential Revision: D21484360

Pulled By: seemethere

fbshipit-source-id: b25cbf35b8432a587bce86815c97ff444cab255c
peterjc123 added a commit to peterjc123/pytorch that referenced this pull request May 30, 2020
Summary:
so we can import torch compiled with cuda on a CPU-only machine.
need tests
Pull Request resolved: pytorch#37811

Differential Revision: D21417082

Pulled By: ezyang

fbshipit-source-id: 7a521b651bca7cbe38269915bd1d1b1bb756b45b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Merged module: build Build system issues 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.

None yet

6 participants