add python gpu test
Browse files- gpu_test.py +7 -0
- startup.sh +1 -0
gpu_test.py
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import torch
|
| 2 |
+
|
| 3 |
+
print(f"is availeble = {torch.cuda.is_available()}")
|
| 4 |
+
|
| 5 |
+
print(f"device count = {torch.cuda.device_count()}")
|
| 6 |
+
|
| 7 |
+
print(f"current device = {torch.cuda.current_device()}")
|
startup.sh
CHANGED
|
@@ -8,6 +8,7 @@ echo "LS: $(ls -als)"
|
|
| 8 |
|
| 9 |
nvidia-smi
|
| 10 |
|
|
|
|
| 11 |
python -m serve.controller --host 0.0.0.0 --port 10000 &
|
| 12 |
P1=$!
|
| 13 |
|
|
|
|
| 8 |
|
| 9 |
nvidia-smi
|
| 10 |
|
| 11 |
+
python gpu_test.py
|
| 12 |
python -m serve.controller --host 0.0.0.0 --port 10000 &
|
| 13 |
P1=$!
|
| 14 |
|