Skip to content

check CUDA_HOME before using it#1499

Merged
crcrpar merged 2 commits into
NVIDIA:masterfrom
crcrpar:check_cuda_home_var
Oct 6, 2022
Merged

check CUDA_HOME before using it#1499
crcrpar merged 2 commits into
NVIDIA:masterfrom
crcrpar:check_cuda_home_var

Conversation

@crcrpar
Copy link
Copy Markdown
Collaborator

@crcrpar crcrpar commented Oct 3, 2022

Related: #1498

I verified this by

$ docker run -it pytorch/pytorch:1.12.1-cuda11.3-cudnn8-runtime /bin/bash
<install vim & git>
$ git clone https://github.com/crcrpar/apex -b check_cuda_home_var
$ cd apex
< modify setup.py so that CUDA_HOME is None>
$ root@mkozuki-desktop:/workspace/apex# pip install -v -e .
Using pip 22.1.2 from /opt/conda/lib/python3.7/site-packages/pip (python 3.7)
Obtaining file:///workspace/apex
  Running command python setup.py egg_info
  CUDA_HOME: None

  Warning: Torch did not find available GPUs on this system.
   If your intention is to cross-compile, this is not an error.
  By default, Apex will cross-compile for Pascal (compute capabilities 6.0, 6.1, 6.2),
  Volta (compute capability 7.0), Turing (compute capability 7.5),
  and, if the CUDA version is >= 11.0, Ampere (compute capability 8.0).
  If you wish to cross-compile for a single specific architecture,
  export TORCH_CUDA_ARCH_LIST="compute capability" before running setup.py.



  torch.__version__  = 1.12.1


  running egg_info
  creating /tmp/pip-pip-egg-info-evcs6qcb/apex.egg-info
  writing /tmp/pip-pip-egg-info-evcs6qcb/apex.egg-info/PKG-INFO
  writing dependency_links to /tmp/pip-pip-egg-info-evcs6qcb/apex.egg-info/dependency_links.txt
  writing top-level names to /tmp/pip-pip-egg-info-evcs6qcb/apex.egg-info/top_level.txt
  writing manifest file '/tmp/pip-pip-egg-info-evcs6qcb/apex.egg-info/SOURCES.txt'
  reading manifest file '/tmp/pip-pip-egg-info-evcs6qcb/apex.egg-info/SOURCES.txt'
  adding license file 'LICENSE'
  writing manifest file '/tmp/pip-pip-egg-info-evcs6qcb/apex.egg-info/SOURCES.txt'
  Preparing metadata (setup.py) ... done

Signed-off-by: Masaki Kozuki <mkozuki@nvidia.com>
@crcrpar
Copy link
Copy Markdown
Collaborator Author

crcrpar commented Oct 6, 2022

@adamjstewart what do you think?

Copy link
Copy Markdown

@adamjstewart adamjstewart left a comment

Choose a reason for hiding this comment

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

Worked for me, thanks for the quick fix!

@crcrpar crcrpar merged commit b213772 into NVIDIA:master Oct 6, 2022
@crcrpar crcrpar deleted the check_cuda_home_var branch October 6, 2022 18:25
@crcrpar crcrpar added this to the 22.11 milestone Oct 25, 2022
@Triple-L
Copy link
Copy Markdown

Thanks it works for me as well.

$python setup.py egg_info

yuanzhedong pushed a commit to yuanzhedong/apex that referenced this pull request Jul 14, 2023
Signed-off-by: Masaki Kozuki <mkozuki@nvidia.com>
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