-
-
Notifications
You must be signed in to change notification settings - Fork 20
GPU Acceleration
WAI2K uses a variety of neural networks which can be accelerated through GPU.
With GPU acceleration, the inference time for the main map detection model can be brought down anywhere from 4000-10000 ms to down to 300 ms on average. This shaves on time each sortie, boosting your SPH and script responsiveness.
Currently GPU acceleration is only available on systems with Nvidia graphics cards, this is a library (Pytorch) limitation.
- Latest Nvidia GPU drivers
- Nvidia CUDA 12.1
- Download and run the Nvidia CUDA installer
- Choose the Custom installation option
- De-select all options except for CUDA>Runtime option
- Install
If you don't know how to edit environment variables, go look it up, plenty of articles out there
-
Search "Environment" or find it in Control Panel -> System -> Advanced system settings
-
"Environment Variables..." button bottom right
-
Double click "Path" in System variables not User Variables
-
Append to the Path variable at the beginning/top:
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.0\bin\
Make sure to click OK, you may need to reboot for path variables to apply.
Screenshots maybe out of date, follow the steps!
You may run into issues with CUDA detection if there's a path variable referencing Nvidia PhysX, so you might want to remove that one if GPU acceleration doesn't work.
If still not working remember to check if your driver version is recent enough
Look for it in Add or Remove Programs -> NVIDIA Graphics Driver
If all is working well, WAI2K will show one or some other non-zero number in the debug console when it launches.
[WAI2K] [2020-10-10 13:28:56.084] [c.w.w.v.LoaderView] INFO - Loading detection model...
[WAI2K] [2020-10-10 13:28:56.134] [a.d.p.j.LibUtils] DEBUG - Using cache dir: /home/waicool20/.djl.ai/pytorch
[WAI2K] [2020-10-10 13:28:56.137] [a.d.p.j.LibUtils] DEBUG - Loading pytorch library from: /home/waicool20/.djl.ai/pytorch/1.7.0-cu110-linux-x86_64/0.9.0-SNAPSHOT-cu110-libdjl_torch.so
[WAI2K] [2020-10-10 13:28:56.397] [a.d.p.e.PtEngine] INFO - Number of inter-op threads is 6
[WAI2K] [2020-10-10 13:28:56.398] [a.d.p.e.PtEngine] INFO - Number of intra-op threads is 8
[WAI2K] [2020-10-10 13:28:56.398] [a.d.e.Engine] DEBUG - Engine loaded from provider: PyTorch
[WAI2K] [2020-10-10 13:28:56.399] [a.d.e.Engine] DEBUG - Found default engine: PyTorch
[WAI2K] [2020-10-10 13:28:56.400] [c.w.w.v.LoaderView] INFO - Detected GPUs: 1
[WAI2K] [2020-10-10 13:28:56.411] [c.w.w.v.LoaderView] INFO - Loading all done! Starting main application
As always, you're welcome to join our discord to ask for help!