CNTK icon indicating copy to clipboard operation
CNTK copied to clipboard

ASGD: syncPeriodPerWorkers parameter ignored (BrainScript) (Beta 11 GPU with 1bSGD binary)

Open ghost opened this issue 9 years ago • 1 comments

update:

SGD.cpp line 3039

m_nSyncSamplesPerWorker = configDataParallelASGD(L"syncPeriod", ConfigRecordType::Array(intargvector(vector<int>{256})));

indicates the correct parameter is syncPeriod and not syncPeriodPerWorker as per documentation. Either needs updating.

original ticket:

configuration file:

custom_minibatchSize = 150
...
SGD = [
    minibatchSize = $custom_minibatchSize$
    ...
    parallelTrain = [
    ...
        DataParallelASGD = [
        ...
        syncPeriodPerWorker=$custom_minibatchSize$
        ...
        ]
    ]
]

with log files reflecting

minibatchSize = 150 
Starting minibatch loop, DataParallelASGD training (...SamplesSyncToServer = 256),... Distributed Evaluation is DISABLED, BufferedAsyncGradientAggregation is ENABLED, distributed reading is ENABLED.

Wiki (https://github.com/Microsoft/CNTK/wiki/Multiple-GPUs-and-machines#24-data-parallel-training-with-parameter-server) gives:

syncPeriodPerWorkers. It specifies the number of samples that each worker need to process before communicating with the parameter servers. The default value is 256. It's recommended as size of minibatch. It’s obvious that frequent sync up will lead to significant high communication cost. In our test, it’s not necessary to set the value to 1 in most cases.

ghost avatar Feb 16 '17 21:02 ghost

Hi @avader906 , thanks for your report, this has been fix in next version

chivee avatar Mar 02 '17 05:03 chivee