Skip to content

Commit

Permalink
diagnostics
Browse files Browse the repository at this point in the history
chrischoy committed Jan 7, 2021
1 parent c54f3cc commit 80d3855
Showing 4 changed files with 88 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -17,10 +17,13 @@ Steps to reproduce the behavior. Please add a minimally reproducible code here.
A clear and concise description of what you expected to happen.

**Desktop (please complete the following information):**
- CUDA version: [e.g. 11.1]
- NVIDIA Driver version: [e.g. 450.11]

- OS: [e.g. Ubuntu 18.04]
- Minkowski Engine version [e.g. 0.5.0]
- Please paste the output of the following command

```
wget -q https://raw.githubusercontent.com/NVIDIA/MinkowskiEngine/master/MinkowskiEngine/diagnostics.py ; python diagnostics.py
```

**Additional context**
Add any other context about the problem here.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -7,13 +7,26 @@
- v0.5 documentation updates
- Nonlinear functionals and modules
- Warning when using cuda without ME cuda support
- diagnostics test

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

### Changed

- Remove Makefile for installation as pytorch supports multithreaded compilation
- GPU coordinate map support
- Coordinate union
- Sparse tensor binary operators
- CUDA 11.1 support
- quantization function updates
- Multi GPU examples
- Pytorch-lightning multi-gpu example
- Transpose pooling layers
- TensorField updates
- Batch-wise decomposition
- inverse_map when sparse() called (slice)
- ChannelwiseConvolution
- TensorField support for non-linearities

## [0.4.3] - 2020-05-29

2 changes: 2 additions & 0 deletions MinkowskiEngine/__init__.py
Original file line number Diff line number Diff line change
@@ -48,6 +48,8 @@
# Must be imported first to load all required shared libs
import torch

from diagnostics import print_diagnostics

from MinkowskiEngineBackend._C import (
MinkowskiAlgorithm,
CoordinateMapKey,
67 changes: 67 additions & 0 deletions MinkowskiEngine/diagnostics.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
import platform
import os
import subprocess


def parse_nvidia_smi():
sp = subprocess.Popen(
["nvidia-smi", "-q"], stdout=subprocess.PIPE, stderr=subprocess.PIPE
)
out_dict = dict()
for item in sp.communicate()[0].decode("utf-8").split("\n"):
if item.count(":") == 1:
key, val = [i.strip() for i in item.split(":")]
out_dict[key] = val
return out_dict


def print_diagnostics():
print("==========System==========")
print(platform.platform())
os.system("cat /etc/lsb-release")

print("==========Pytorch==========")
try:
import torch

print(torch.__version__)
print(f"torch.cuda.is_available(): {torch.cuda.is_available()}")
except ImportError:
print("torch not installed")

print("==========NVIDIA-SMI==========")
os.system("which nvidia-smi")
for k, v in parse_nvidia_smi().items():
if "version" in k.lower():
print(k, v)

print("==========NVCC==========")
os.system("which nvcc")
os.system("nvcc --version")

print("==========CC==========")
CC = "c++"
if "CC" in os.environ or "CXX" in os.environ:
# distutils only checks CC not CXX
if "CXX" in os.environ:
os.environ["CC"] = os.environ["CXX"]
CC = os.environ["CXX"]
else:
CC = os.environ["CC"]
print(f"CC={CC}")
os.system(f"which {CC}")
os.system(f"{CC} --version")

print("==========MinkowskiEngine==========")
try:
import MinkowskiEngine as ME

print(ME.__version__)
print(f"MinkowskiEngine compiled with CUDA Support: {ME.is_cuda_available()}")
print(f"NVCC version MinkowskiEngine is compiled: {ME.cuda_version()}")
except ImportError:
print("MinkowskiEngine not installed")


if __name__ == "__main__":
print_diagnostics()

0 comments on commit 80d3855

Please sign in to comment.