baidu-research / persistent-rnn

Fast Recurrent Networks Library
Apache License 2.0
574 stars 87 forks source link

Error when building library ('scratchDimension' set but not used) #8

Closed SeanNaren closed 8 years ago

SeanNaren commented 8 years ago

Hey! When building the library, running scons mode=release install=true terminates with this error:

src/detail/rnn/recurrent_ops.cu: In function 'size_t prnn::rnn::getForwardPropScratchSize(const prnn::RecurrentOpsHandle&, const prnn::matrix::Precision&)':
src/detail/rnn/recurrent_ops.cu:789:6: error: variable 'scratchDimension' set but not used [-Werror=unused-but-set-variable]
     auto scratchDimension = extendDimensions(dimension, precision);
      ^
At global scope:
cc1plus: error: unrecognized command line option "-Wno-unused-private-field" [-Werror]
cc1plus: all warnings being treated as errors
scons: *** [.release_build/src/detail/rnn/recurrent_ops.os] Error 1
scons: building terminated because of errors.

Running on Ubuntu 14.04 with a GTX 1080. Thanks!

SeanNaren commented 8 years ago

Seems like getting rid of

auto scratchDimension = extendDimensions(dimension, precision);

at line 789 from src/detail/rnn/recurrent_ops.cu solved the issue!

gdiamos commented 8 years ago

Thanks for the report. I removed the line from my development branch. I should merge it in soon.

SeanNaren commented 8 years ago

Sounds good!