Skip to content

Commit c54f3cc

Browse files
committed
cuda support warnings, minor updates
1 parent 6956b30 commit c54f3cc

File tree

7 files changed

+27
-8
lines changed

7 files changed

+27
-8
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44

55
### Added
66

7+
- v0.5 documentation updates
78
- Nonlinear functionals and modules
9+
- Warning when using cuda without ME cuda support
810

911
## [0.5.0a] - 2020-08-05
1012

MinkowskiEngine/MinkowskiChannelwiseConvolution.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,9 @@ def __init__(
114114
"""
115115

116116
super(MinkowskiChannelwiseConvolution, self).__init__()
117-
assert dimension > 0, f"dimension must be a positive integer, {dimension}"
117+
assert (
118+
dimension > 0
119+
), f"Invalid dimension. Please provide a valid dimension argument. dimension={dimension}"
118120

119121
if kernel_generator is None:
120122
kernel_generator = KernelGenerator(

MinkowskiEngine/MinkowskiConvolution.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,9 @@ def __init__(
238238
239239
"""
240240
super(MinkowskiConvolutionBase, self).__init__()
241-
assert dimension > 0, f"dimension must be a positive integer, {dimension}"
241+
assert (
242+
dimension > 0
243+
), f"Invalid dimension. Please provide a valid dimension argument. dimension={dimension}"
242244

243245
if kernel_generator is None:
244246
kernel_generator = KernelGenerator(

MinkowskiEngine/MinkowskiCoordinateManager.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,10 @@ def __init__(
133133
if coordinate_map_type == CoordinateMapType.CPU:
134134
postfix = "CPU"
135135
else:
136+
assert (
137+
_C.is_cuda_available()
138+
), "The MinkowskiEngine was compiled with CPU_ONLY flag. If you want to compile with CUDA support, make sure `torch.cuda.is_available()` is True when you install MinkowskiEngine."
139+
136140
postfix = "GPU" + (
137141
"_default" if allocator_type == GPUMemoryAllocatorType.CUDA else "_c10"
138142
)

MinkowskiEngine/MinkowskiPooling.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,9 @@ def __init__(
129129
dimension=-1,
130130
):
131131
super(MinkowskiPoolingBase, self).__init__()
132-
assert dimension > 0, f"dimension must be a positive integer, {dimension}"
132+
assert (
133+
dimension > 0
134+
), f"Invalid dimension. Please provide a valid dimension argument. dimension={dimension}"
133135

134136
if kernel_generator is None:
135137
kernel_generator = KernelGenerator(

MinkowskiEngine/__init__.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,3 +197,14 @@
197197
import MinkowskiEngine.modules as modules
198198

199199
from sparse_matrix_functions import spmm, MinkowskiSPMMFunction
200+
201+
202+
if not is_cuda_available():
203+
warnings.warn(
204+
" ".join(
205+
[
206+
"The MinkowskiEngine was compiled with CPU_ONLY flag.",
207+
"If you want to compile with CUDA support, make sure `torch.cuda.is_available()` is True when you install MinkowskiEngine.",
208+
]
209+
)
210+
)

README.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,9 @@ The Minkowski Engine is an auto-differentiation library for sparse tensors. It s
99

1010
## News
1111

12-
- 2020-12-24 v0.5 is now available! Try with `pip install git+https://github.com/NVIDIA/MinkowskiEngine.git`.
12+
- 2020-12-24 v0.5 is now available!
1313
- 2020-08-18 v0.5 beta version is now available! [The speedup compared with v0.4.3 ranges from x2 to x5 depending on the network architectures](https://github.com/chrischoy/MinkowskiEngineBenchmark). Please install with the following command. The migration guide from v0.4 to v0.5 is available at [the wiki page](https://github.com/NVIDIA/MinkowskiEngine/wiki/Migration-Guide-from-v0.4.x-to-0.5.x). Feel free to update the wiki page to add and update any discrepancies you see.
1414

15-
```
16-
pip install git+https://github.com/NVIDIA/MinkowskiEngine.git
17-
```
18-
1915
## Example Networks
2016

2117
The Minkowski Engine supports various functions that can be built on a sparse tensor. We list a few popular network architectures and applications here. To run the examples, please install the package and run the command in the package root directory.

0 commit comments

Comments
 (0)