singa icon indicating copy to clipboard operation
singa copied to clipboard

Switch between CPU and GPU devices for cnn example

Open lzjpaul opened this issue 3 years ago • 3 comments

For cifar_distributed_cnn and cnn examples, the model is by default run on the GPU. Need to enable it to run on CPU for machines with only CPUs

lzjpaul avatar Dec 05 '22 10:12 lzjpaul

Add a conditional judgement to decide whether use CPU or GPU and then apply the devices to datasets and models

lzjpaul avatar Feb 21 '23 03:02 lzjpaul

https://github.com/apache/singa/commit/0a2d9b20c743b7b1501f1b50db32d36b00de85a0

lzjpaul avatar Feb 21 '23 03:02 lzjpaul

modify line 114 for judging CPU and GPU in https://github.com/apache/singa/blob/dev/examples/cifar_distributed_cnn/train_cnn.py

lzjpaul avatar Feb 24 '23 08:02 lzjpaul

This has been resolved in https://github.com/apache/singa/blob/dev/examples/cifar_distributed_cnn/train_cnn.py

lzjpaul avatar Jun 13 '24 14:06 lzjpaul