Skip to content

Commit

Permalink
Fix compilation for systems that have CUDA sdk but no CUDA devices
Browse files Browse the repository at this point in the history
  • Loading branch information
ducksoup committed Aug 23, 2019
1 parent 4043965 commit 6b2b114
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ To install PyTorch, please refer to https://github.com/pytorch/pytorch#installat

To install the package containing the iABN layers:
```bash
pip install git+https://github.com/mapillary/[email protected].5
pip install git+https://github.com/mapillary/[email protected].6
```
Note that some parts of InPlace-ABN have native C++/CUDA implementations, meaning that the command above will need to
compile them.
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def find_sources(root_dir, with_cuda=True):
with open(path.join(here, "README.md"), encoding="utf-8") as f:
long_description = f.read()

if torch.cuda.is_available():
if torch.has_cuda:
ext_modules = [
CUDAExtension(
name="inplace_abn._backend",
Expand Down

0 comments on commit 6b2b114

Please sign in to comment.