I am trying to use caffe with intel python2.7 v2017.3, but executing "import caffe" results in crashing the interpreter with "Illegal instruction". (The same error was seen on v2017.2.)
My cpu is i5-3570 (which has sse4_2), os is debian-8 jessie. The /proc/cpuinfo file is attached.
Thank you for looking into this!
Thanks for reporting this.
I believe this may be linked to an issue in Pandas. Can you reproduce the error by running the following command?
python -c 'import pandas'
thank you response. Pandas is imported fine (and works fine), for the moment I only got into problems with caffe. With bash:
$ /opt/intel/intelpython2/bin/python -c 'import caffe; print "ok"' ; echo $?
$ /opt/intel/intelpython2/bin/python -c 'import pandas; print "ok"' ; echo $?
importing tables works fine (as well as numpy, scipy, h5py, theano).
In /opt/intel/intelpython2/bin there are some caffe related binaries, those crash as well:
$ /opt/intel/intelpython2/bin/caffe ; echo $?
Same for /opt/intel/intelpython2/bin/classification .
Everything runs fine on the newer i5-7500 (including python -c 'import caffe', the caffe binary etc), but not on the i5-3570. Is there a chance some exclusive architecture specific optimization was invoked when compiling caffe, which works with new cpus like i5-7500, but not with somewhat older ones like i5-3570 ?
Thanks for troubleshooting. The optimizations done to Intel Caffe rely on the presence of AVX2. I'm working on a Caffe build that will work on all architectures that Intel Python supports so people will not encounter the illegal instruction error if they don't have AVX2, but AVX2 is still necessary to take advantage of the performance enhancements provided by Intel Caffe.
I checked, and indeed the i5-3570 does not have avx2. I would greatly appreciate if you could provide a compiled caffe binary which works without avx2. I understand this means performace dip, but at least it would run on the avx2-less cpus.
Thank you in advance!