CNTK icon indicating copy to clipboard operation
CNTK copied to clipboard

Example AN4, 1-bit SGD?

Open jren2012 opened this issue 10 years ago • 6 comments

"EXCEPTION occurred: Gradient quantization is unsupported in CNTK binaries built without quantized gradient aggregation support!"

What's the mean of this prompt when I try to run AN4 example? any explanation is appreciated.

[CALL STACK] /home/jren/Repos/cntk/build/release/bin/../lib/libcntkmath.so ( Microsoft::MSR::CNTK::DebugUtil::PrintCallStack() + 0xc3 ) [0x7f2f00302053] cntk ( void Microsoft::MSR::CNTK::ThrowFormattedstd::runtime_error(char const_, ...) + 0xdd ) [0x53d6ad] cntk ( Microsoft::MSR::CNTK::SGD::InitDistGradAgg(int, int) + 0x220 ) [0x741780] cntk ( Microsoft::MSR::CNTK::SGD::TrainOrAdaptModel(int, std::shared_ptrMicrosoft::MSR::CNTK::ComputationNetwork, bool, std::shared_ptrMicrosoft::MSR::CNTK::ComputationNetwork, std::shared_ptrMicrosoft::MSR::CNTK::ComputationNodeBase, Microsoft::MSR::CNTK::IDataReader, Microsoft::MSR::CNTK::IDataReader) + 0x23de) [0x77251e] cntk ( Microsoft::MSR::CNTK::SGD::Train(std::functionstd::shared_ptr<Microsoft::MSR::CNTK::ComputationNetwork (int)>, int, Microsoft::MSR::CNTK::IDataReader, Microsoft::MSR::CNTK::IDataReader, bool) + 0x441 ) [0x773bf1] cntk ( void DoTrain<Microsoft::MSR::CNTK::ConfigParameters, float>(Microsoft::MSR::CNTK::ConfigParameters const&) + 0x22d ) [0x78b7dd] cntk ( void DoCommands(Microsoft::MSR::CNTK::ConfigParameters const&) + 0x7bc ) [0x5a5e8c] cntk ( wmainOldCNTKConfig(int, wchar_t__) + 0xacb ) [0x533c4b] cntk ( wmain1(int, wchar_t_*) + 0x6a ) [0x5343fa] cntk ( main + 0xcc ) [0x5267fc] /lib/x86_64-linux-gnu/libc.so.6 ( __libc_start_main + 0xf0 ) [0x7f2efef3da40] cntk ( _start + 0x29 ) [0x52a499]

#EXCEPTION occurred: Gradient quantization is unsupported in CNTK binaries built without quantized gradient aggregation support!

jren2012 avatar Feb 21 '16 19:02 jren2012

Jun, AN4 exapmle requires 1bit-SGD, which seems to be not there in your case.

If you used binary downloads get the package with 1bit-SGD in (we published it in the latest release). If you built from sources, re-build it with 1bit-SGD support as described here https://github.com/Microsoft/CNTK/wiki/Enabling-1bit-SGD

Also, please be aware, that 1bit-SGD component is licensed differently (both Releases page and the Wiki article above explain the difference)

Thank you, Alexey

alexeyo26 avatar Feb 21 '16 19:02 alexeyo26

thanks your immediate reply, @alexeyo26

jren2012 avatar Feb 21 '16 19:02 jren2012

You're welcome. :) Please, let us know whether it's fixed your issue. Thank you, Alexey

alexeyo26 avatar Feb 21 '16 19:02 alexeyo26

@alexeyo26 Hi Alexey, I met the problem also after I rebuilt the source code. Do I need to run the command "make clean" before I run the command "make -j all"?

The installation guide says "Pass the option --1bitsgd=yes to the configure command.". Is it means to 1)revise the configure file as: default_use_1bitsgd=no; or 2) run the command in the terminal: ../../configure --1bitsgd=yes.

I tried both these two ways, the output is below. And I still met the same problem when I run AN4 example.

jren@jren-HP-EliteDesk-800-G1-SFF:~/Repos/cntk/build/release $ make -j all make -C /home/jren/Repos/cntk BUILD_TOP=/home/jren/Repos/cntk/build/release all make[1]: Entering directory '/home/jren/Repos/cntk' =-----------------------------------------------------------= finished building for with build type release make[1]: Leaving directory '/home/jren/Repos/cntk'

jren2012 avatar Feb 22 '16 02:02 jren2012

Hi, Jun,

Yes, to rebuild you need to run "make clean" first. Try this:

Make sure you cloned the repository right, and your folder Source/1BitSGD contains 1bit-SGD code (two .h files). If not, get it as described in the Wiki article I mentioned above.

Then:

make clean
../../configure   --1bitsgd=yes

Check Config.make and ensure that the line CNTK_ENABLE_1BitSGD=true is there

Then make all or make -j all

Hope it fill fix it. Thank you, Alexey

alexeyo26 avatar Feb 22 '16 06:02 alexeyo26

Judging from this thread #145 I understand, that this issue is fixed, so I will close it.

alexeyo26 avatar Feb 23 '16 06:02 alexeyo26