I followed you way with minor modification and successfully compiled fp16 version
I have to remove this line,
sed -i ‘s/hdf5_hl/hdf5_serial_hl/g’ Makefile (to be removed)
otherwise Makefile will have this:
LIBRARIES += glog gflags protobuf boost_system m hdf5_serial_serial_hl hdf5_serial
Below is my way:
git clone -b experimental/fp16 https://github.com/NVIDIA/caffe caffe_fp16
cd caffe_fp16/
cp Makefile.config.example Makefile.config
sed -i 's/# NATIVE_FP16/NATIVE_FP16/g' Makefile.config
sed -i 's/# USE_CUDNN/USE_CUDNN/g' Makefile.config
sed -i 's/-gencode arch=compute_50,code=compute_50/-gencode arch=compute_53,code=sm_53 -gencode arch=compute_53,code=compute_53/g' Makefile.config
sed -i 's/\/usr\/local\/include/\/usr\/local\/include \/usr\/include\/hdf5\/serial\//g' Makefile.config
sed -i 's/hdf5/hdf5_serial/g' Makefile
make -j4
make test -j4
make runtest -j4
However, when I make runtest, it failed in some cases.
[ FAILED ] CuDNNNeuronLayerTest/2.TestTanHGradientCuDNN, where TypeParam = caffe::MultiPrecision<caffe::f loat16, float> (226 ms)
[ RUN ] CuDNNNeuronLayerTest/2.TestReLUCuDNN
[ OK ] CuDNNNeuronLayerTest/2.TestReLUCuDNN (0 ms)
[----------] 8 tests from CuDNNNeuronLayerTest/2 (896 ms total)
[----------] 1 test from InfogainLossLayerTest/4, where TypeParam = caffe::GPUDevice<caffe::MultiPrecision< double, double> >
[ RUN ] InfogainLossLayerTest/4.TestGradient
[ OK ] InfogainLossLayerTest/4.TestGradient (48 ms)
[----------] 1 test from InfogainLossLayerTest/4 (48 ms total)
[----------] 12 tests from DataLayerTest/1, where TypeParam = caffe::CPUDevice<caffe::MultiPrecision<double , double> >
[ RUN ] DataLayerTest/1.TestReadLMDB
F0316 15:15:48.180516 32693 db_lmdb.hpp:25] Check failed: mdb_status == 0 (12 vs. 0) Cannot allocate memory
*** Check failure stack trace: ***
@ 0x7f9ff29718 google::LogMessage::Fail()
@ 0x7f9ff2b614 google::LogMessage::SendToLog()
@ 0x7f9ff29290 google::LogMessage::Flush()
@ 0x7f9ff2beb4 google::LogMessageFatal::~LogMessageFatal()
@ 0x7f9eb58314 caffe::db::LMDB::Open()
@ 0x651394 caffe::DataLayerTest<>::Fill()
@ 0x65c61c caffe::DataLayerTest_TestReadLMDB_Test<>::TestBody()
@ 0xa6af44 testing::internal::HandleExceptionsInMethodIfSupported<>()
@ 0xa6324c testing::Test::Run()
@ 0xa63388 testing::TestInfo::Run()
@ 0xa63448 testing::TestCase::Run()
@ 0xa645a8 testing::internal::UnitTestImpl::RunAllTests()
@ 0xa648bc testing::UnitTest::Run()
@ 0x56c1d8 main
@ 0x7f9e6058a0 __libc_start_main
Makefile:552: recipe for target 'runtest' failed
Looks like LMDB_MAP_SIZE is platform dependent.
We modify LMDB_MAP_SIZE to 2TB by the suggestion of caffe on jetson tk1 · Issue #1861 · BVLC/caffe · GitHub.
Test LMDB functionality with “DataLayerTest/4.TestReadCropTrainSequenceUnseededLMDB” test item and MNIST training sample.
Both works well.
I faced the same error when I was trying to make runtest.
i.e F0601 09:09:41.345368 4892 db_lmdb.hpp:13] Check failed: mob_status == 0 (12 vs. 0) Cannot allocate memory
I tried your suggestion in #4, however, I realised that my db_lmdb.hpp file looks quite different as it does not have “const size_t LMDB_MAP_SIZE” at all. I tried to add the suggestions to the file but that just made more errors during runtest.
Do you know if I’m having the right db_lmdb.hpp file?
As mentioned in #4, this suggestion is based on an comment posted in caffe github. https://github.com/BVLC/caffe/issues/1861
Looks like enlarge LMDB_MAP_SIZE to 2TB helps.