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

Allow forcing GPU build with FORCE_CUDA=1 #927

Merged
merged 3 commits into from
May 24, 2019
Merged

Conversation

lopuhin
Copy link
Contributor

@lopuhin lopuhin commented May 20, 2019

This is convenient to e.g. build with GPU support inside a docker image, because GPU is often not available during the docker build, but the image is intended to be used with nvidia-docker. Related previous attempt - #911, reverted in #924 because it breaks the build in some cases.
This PR is similar to facebookresearch/maskrcnn-benchmark#612

I wonder if we should mention anything in the docs about this flag, e.g. at the end of installation section here https://github.com/pytorch/vision#installation ?

This is convenient to e.g. build with GPU support inside a docker image
@codecov-io
Copy link

codecov-io commented May 20, 2019

Codecov Report

Merging #927 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #927   +/-   ##
=======================================
  Coverage   60.15%   60.15%           
=======================================
  Files          63       63           
  Lines        5019     5019           
  Branches      748      748           
=======================================
  Hits         3019     3019           
- Misses       1795     1796    +1     
+ Partials      205      204    -1
Impacted Files Coverage Δ
torchvision/datasets/imagenet.py 21.55% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f516753...672fef0. Read the comment docs.

Copy link
Member

@fmassa fmassa left a comment

Choose a reason for hiding this comment

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

LGTM!

And yes, we should probably include documentation for this flag, together with the build instructions for torchvision now that we have custom ops, as OSX requires adding

MACOSX_DEPLOYMENT_TARGET=10.9 CC=clang CXX=clang++ python setup.py build develop

for the build.

@soumith thoughts?

Copy link
Member

@fmassa fmassa left a comment

Choose a reason for hiding this comment

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

Thanks!

@fmassa fmassa merged commit 1ed61e4 into pytorch:master May 24, 2019
@lopuhin lopuhin deleted the force-cuda branch May 24, 2019 15:23
@lopuhin
Copy link
Contributor Author

lopuhin commented May 24, 2019

Thanks for review @fmassa 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants