HKU-Smart-Mobility-Lab / Transportation_Simulator

MIT License
29 stars 9 forks source link

Support GPU acceleration? #30

Closed KL4805 closed 7 months ago

KL4805 commented 11 months ago

Hello authors,

Thanks for your patience in helping me running your simulator! It now works OK, but an epoch may take ~900s on CPU. I wonder whether your code can support GPU acceleration (or has supported?)

Caffretro commented 11 months ago

Yes, it does support GPU acceleration. For training using different simulator methods, you can check the algorithm modules it uses (e.g. A2C.py, sarsa.py, etc.), and configure GPU acceleration environments corresponding to the required machine learning modules.

Since we are not considering upgrading the algorithm's dependencies, the required CUDA and cuDNN versions may differ from yours. You may need to check your CUDA and cuDNN versions, as they may not support the modules our code uses

chenhaoling commented 11 months ago

Hi, we find it difficult to configure this version of TensorFlow to support GPU acceleration, you could use Torch to implement the algorithm for dispatching.

chenhaoling commented 7 months ago

We have added docker image to support GPU acceleration.