Skip to content

Commit 80d3855

Browse files
committed
diagnostics
1 parent c54f3cc commit 80d3855

File tree

4 files changed

+88
-3
lines changed

4 files changed

+88
-3
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

+6-3
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,13 @@ Steps to reproduce the behavior. Please add a minimally reproducible code here.
1717
A clear and concise description of what you expected to happen.
1818

1919
**Desktop (please complete the following information):**
20-
- CUDA version: [e.g. 11.1]
21-
- NVIDIA Driver version: [e.g. 450.11]
20+
2221
- OS: [e.g. Ubuntu 18.04]
23-
- Minkowski Engine version [e.g. 0.5.0]
22+
- Please paste the output of the following command
23+
24+
```
25+
wget -q https://raw.githubusercontent.com/NVIDIA/MinkowskiEngine/master/MinkowskiEngine/diagnostics.py ; python diagnostics.py
26+
```
2427

2528
**Additional context**
2629
Add any other context about the problem here.

CHANGELOG.md

+13
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,26 @@
77
- v0.5 documentation updates
88
- Nonlinear functionals and modules
99
- Warning when using cuda without ME cuda support
10+
- diagnostics test
1011

1112
## [0.5.0a] - 2020-08-05
1213

1314
### Changed
1415

1516
- Remove Makefile for installation as pytorch supports multithreaded compilation
1617
- GPU coordinate map support
18+
- Coordinate union
19+
- Sparse tensor binary operators
20+
- CUDA 11.1 support
21+
- quantization function updates
22+
- Multi GPU examples
23+
- Pytorch-lightning multi-gpu example
24+
- Transpose pooling layers
25+
- TensorField updates
26+
- Batch-wise decomposition
27+
- inverse_map when sparse() called (slice)
28+
- ChannelwiseConvolution
29+
- TensorField support for non-linearities
1730

1831
## [0.4.3] - 2020-05-29
1932

MinkowskiEngine/__init__.py

+2
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@
4848
# Must be imported first to load all required shared libs
4949
import torch
5050

51+
from diagnostics import print_diagnostics
52+
5153
from MinkowskiEngineBackend._C import (
5254
MinkowskiAlgorithm,
5355
CoordinateMapKey,

MinkowskiEngine/diagnostics.py

+67
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
import platform
2+
import os
3+
import subprocess
4+
5+
6+
def parse_nvidia_smi():
7+
sp = subprocess.Popen(
8+
["nvidia-smi", "-q"], stdout=subprocess.PIPE, stderr=subprocess.PIPE
9+
)
10+
out_dict = dict()
11+
for item in sp.communicate()[0].decode("utf-8").split("\n"):
12+
if item.count(":") == 1:
13+
key, val = [i.strip() for i in item.split(":")]
14+
out_dict[key] = val
15+
return out_dict
16+
17+
18+
def print_diagnostics():
19+
print("==========System==========")
20+
print(platform.platform())
21+
os.system("cat /etc/lsb-release")
22+
23+
print("==========Pytorch==========")
24+
try:
25+
import torch
26+
27+
print(torch.__version__)
28+
print(f"torch.cuda.is_available(): {torch.cuda.is_available()}")
29+
except ImportError:
30+
print("torch not installed")
31+
32+
print("==========NVIDIA-SMI==========")
33+
os.system("which nvidia-smi")
34+
for k, v in parse_nvidia_smi().items():
35+
if "version" in k.lower():
36+
print(k, v)
37+
38+
print("==========NVCC==========")
39+
os.system("which nvcc")
40+
os.system("nvcc --version")
41+
42+
print("==========CC==========")
43+
CC = "c++"
44+
if "CC" in os.environ or "CXX" in os.environ:
45+
# distutils only checks CC not CXX
46+
if "CXX" in os.environ:
47+
os.environ["CC"] = os.environ["CXX"]
48+
CC = os.environ["CXX"]
49+
else:
50+
CC = os.environ["CC"]
51+
print(f"CC={CC}")
52+
os.system(f"which {CC}")
53+
os.system(f"{CC} --version")
54+
55+
print("==========MinkowskiEngine==========")
56+
try:
57+
import MinkowskiEngine as ME
58+
59+
print(ME.__version__)
60+
print(f"MinkowskiEngine compiled with CUDA Support: {ME.is_cuda_available()}")
61+
print(f"NVCC version MinkowskiEngine is compiled: {ME.cuda_version()}")
62+
except ImportError:
63+
print("MinkowskiEngine not installed")
64+
65+
66+
if __name__ == "__main__":
67+
print_diagnostics()

0 commit comments

Comments
 (0)