synchronize message

This commit is contained in:
Marcin Junczys-Dowmunt 2016-04-18 19:54:46 +02:00
parent 822b1e1d24
commit 1722f4cbb0
2 changed files with 2 additions and 2 deletions

View File

@ -22,7 +22,7 @@ endif(Boost_FOUND)
set(EXT_LIBS ${EXT_LIBS} /home/marcinj/Badania/kenlm/build/lib/libkenlm.a)
set(EXT_LIBS ${EXT_LIBS} /home/marcinj/Badania/kenlm/build/lib/libkenlm_util.a)
include_directories(/home/marcinj/Badania/kenlm)
add_definitions(-DKENLM_MAX_ORDER=9)
add_definitions(-DKENLM_MAX_ORDER=6)
#find_package (OpenMP)
#if (OPENMP_FOUND)

View File

@ -111,10 +111,10 @@ int main(int argc, char* argv[]) {
{
ThreadPool devicePool(devices.size());
for(size_t i = 0; i < devices.size(); ++i) {
std::cerr << "Loading model " << modelPath << " onto gpu" << devices[i] << std::endl;
devicePool.enqueue([i, &devices, &modelsPerDevice, &modelPaths]{
cudaSetDevice(devices[i]);
for(auto& modelPath : modelPaths) {
std::cerr << "Loading model " << modelPath << " onto gpu" << devices[i] << std::endl;
modelsPerDevice[i].emplace_back(new Weights(modelPath, devices[i]));
}
});