--check-gpu
π¦ AthenaAI is an AI-powered ensemble machine-learning trading bot for PocketOption, built on BinaryOptionsToolsV2 β Get it on GitLab
π¬ Need help? Join the Chipa Discord Β· β‘ Go no-code with ChipaEditor
Print which device the neural model would train on, then exit. No data is loaded and no training happens.
| Type | boolean flag (store_true) |
| Default | off |
| Maps to | handled directly in train.py main() β never reaches TrainerConfig |
| Read in | train.py β src/training/device.py (detect_device()) |
What it does
main() checks this flag first. If set, it calls detect_device() (with no arguments, so --cpu is not applied), prints one line, and returns exit code 0:
if args.check_gpu:
device, desc = detect_device()
print(f"Device: {device} ({desc})")
return 0
detect_device() (src/training/device.py) returns one of:
| Output | Meaning |
|---|---|
Device: cuda (GPU: <name> (<N> GB VRAM)) | PyTorch with a working CUDA GPU; name and total VRAM come from torch.cuda.get_device_name(0) / device properties |
Device: mps (GPU: Apple Metal (MPS)) | Apple Silicon with MPS available |
Device: cpu (CPU (PyTorch not installed β pip install torch for GPU training)) | torch import failed |
Device: cpu (CPU (PyTorch installed but no GPU available)) | torch present, no CUDA/MPS |
All other flags on the command line are ignored when --check-gpu is present.
Choosing a value
Not applicable β itβs a diagnostic switch. Use it:
- after installing PyTorch, to confirm the CUDA build is active (if you have an NVIDIA GPU but see
cpu, you likely installed the CPU-only wheel β reinstall from the CUDA index, e.g.pip install torch --index-url https://download.pytorch.org/whl/cu121); - before a long training run, to know whether the MLP will use the GPU.
Examples
python train.py --check-gpu
# Device: cuda (GPU: NVIDIA GeForce RTX 4070 (12.0 GB VRAM))python train.py --check-gpuInteractions
--cpuβ not consulted by--check-gpu; the check reports what auto-detection finds.--no-nnβ if you plan to skip the NN anyway, the device is irrelevant.
See also
π¬ Unsure how this interacts with the rest of the configuration? Ask in the Chipa Discord β or prototype strategies no-code with ChipaEditor.