[
https://issues.apache.org/jira/browse/SINGA-308?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15962620#comment-15962620
]
wangwei commented on SINGA-308:
-------------------------------
https://gist.github.com/nudles/0e84a3f6e191a863c9926ae1823797d7
This updated code works on my computer.
Instructions:
1. compile singa with
{code}
cmake -DENABLE_TEST=ON -DUSE_CUDA=ON -DUSE_PYTHON=OFF ..
make
{code}
2. goto the examples/cifar10/ folder
{code}
./run-parallel.sh
{code}
Training loss will be displayed every epoch. It is slower than using two GPUs.
Output:
{code}
[I d0410 t17:00:22 p04348:552
/home/wangwei/incubator-singa/src/model/feed_forward_net.cc:94] conv3_weight :
0.00798638
[I d0410 t17:00:22 p04348:552
/home/wangwei/incubator-singa/src/model/feed_forward_net.cc:94] conv3_bias : 0
[I d0410 t17:00:22 p04348:552
/home/wangwei/incubator-singa/src/model/feed_forward_net.cc:94] ip_weight :
0.00795636
[I d0410 t17:00:22 p04348:552
/home/wangwei/incubator-singa/src/model/feed_forward_net.cc:94] ip_bias : 0
[I d0410 t17:00:23 p04348:552
/home/wangwei/incubator-singa/examples/cifar10/alexnet-parallel.cc:232]
Launching thread...
[W d0410 t17:00:23 p04348:-736
/home/wangwei/incubator-singa/src/utils/channel.cc:70] Messages will be
appended to an existed file: train_perf
[W d0410 t17:00:23 p04348:-736
/home/wangwei/incubator-singa/src/utils/channel.cc:70] Messages will be
appended to an existed file: val_perf
Epoch 0, training loss = 1.783590, accuracy = 0.348760, lr = 0.001000
Epoch 0, val loss = 1.425126, metric = 0.495200
Epoch 1, training loss = 1.333072, accuracy = 0.527440, lr = 0.001000
Epoch 1, val loss = 1.231285, metric = 0.561500
Epoch 2, training loss = 1.139128, accuracy = 0.599760, lr = 0.001000
Epoch 2, val loss = 1.080900, metric = 0.619300
{code}
> CPU-GPU parallelism
> --------------------
>
> Key: SINGA-308
> URL: https://issues.apache.org/jira/browse/SINGA-308
> Project: Singa
> Issue Type: Test
> Components: Core, PySINGA
> Environment: Ubuntu 16.04
> CPU-GPU of the same machine
> Reporter: Muhammad Hamdan
> Labels: test
>
> Is it possible to parallelize the alexnet model for the cifar10 example on a
> CPU and GPU instead of 2-GPUs ? Assuming asynchronous communication between
> the two components
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)