Skip to content

Commit

Permalink
Merge pull request #133 from drnikolaev/bugfix_01
Browse files Browse the repository at this point in the history
Workaround for possible race condition reproducible on some HW + step up to 0.14.5
  • Loading branch information
drnikolaev committed Mar 30, 2016
2 parents fe1f8f9 + 9c3b03c commit aded6eb
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ cmake_minimum_required(VERSION 2.8.7)
project(Caffe C CXX)

# ---[ Caffe version
set(CAFFE_TARGET_VERSION "0.14.4")
set(CAFFE_TARGET_VERSION "0.14.5")
set(CAFFE_TARGET_SOVERSION "0.14")
add_definitions(-DCAFFE_VERSION=${CAFFE_TARGET_VERSION})

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ LIB_BUILD_DIR := $(BUILD_DIR)/lib
STATIC_NAME := $(LIB_BUILD_DIR)/lib$(LIBRARY_NAME).a
DYNAMIC_VERSION_MAJOR := 0
DYNAMIC_VERSION_MINOR := 14
DYNAMIC_VERSION_REVISION := 4
DYNAMIC_VERSION_REVISION := 5
DYNAMIC_NAME_SHORT := lib$(LIBRARY_NAME).so
DYNAMIC_SONAME_SHORT := $(DYNAMIC_NAME_SHORT).$(DYNAMIC_VERSION_MAJOR).$(DYNAMIC_VERSION_MINOR)
DYNAMIC_VERSIONED_NAME_SHORT := $(DYNAMIC_SONAME_SHORT).$(DYNAMIC_VERSION_REVISION)
Expand Down
15 changes: 8 additions & 7 deletions src/caffe/test/test_gradient_based_solver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -470,13 +470,14 @@ class GradientBasedSolverTest : public MultiDeviceTest<TypeParam> {
const int kIterSize = 1;
const int kNum = num_;
// Test over all numbers of devices.
int available_devices = 1;
#ifndef CPU_ONLY
if (Caffe::mode() == Caffe::GPU) {
CUDA_CHECK(cudaGetDeviceCount(&available_devices));
}
#endif
for (int devices = 1; devices <= available_devices; ++devices) {
// int available_devices = 1;
// #ifndef CPU_ONLY
// if (Caffe::mode() == Caffe::GPU) {
// CUDA_CHECK(cudaGetDeviceCount(&available_devices));
// }
// #endif
// TODO temporarily set to single GPU mode due to issues on some HW.
for (int devices = 1; devices <= 1 /*available_devices*/; ++devices) {
// Configure batch size for single / multi device equivalence.
// Constant data is needed for multi device as for accumulation.
num_ = kNum * devices * devices;
Expand Down

0 comments on commit aded6eb

Please sign in to comment.