FS#56258 - [tensorflow] tensorflow-cuda is built using -march=haswell but should be -x86_64

Attached to Project: Community Packages
Opened by Andris Pavenis (andris) - Monday, 06 November 2017, 17:59 GMT
Last edited by Sven-Hendrik Haase (Svenstaro) - Thursday, 09 November 2017, 16:27 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Sven-Hendrik Haase (Svenstaro)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

Trying to use tensorflow-cuda on Sandybridge E CPU (i7 3930K) causes error message about AVX instructions not available.

Perhaps only tensorflow-opt should should have 'export CC_OPT_FLAGS="-march=haswell"' in PKGBUILD


Additional info:
* package version(s)
pkgver=1.4.0 (from PKGBUILD)


Steps to reproduce:
Install tensorflow-cuda on CPU older than Haswell (like Sandy Bridge or Ivy Bridge) and try to run it
This task depends upon

Closed by  Sven-Hendrik Haase (Svenstaro)
Thursday, 09 November 2017, 16:27 GMT
Reason for closing:  Fixed
Comment by Sven-Hendrik Haase (Svenstaro) - Tuesday, 07 November 2017, 04:45 GMT
This is by design. The assumption is that if you want CUDA, you want things to be speedy anyway and AVX2 does make things a lot more speedy. Let's discuss this. Do you think there should be a tensorflow-opt-cuda package? I assumed that people doing ML with CUDA these days would strongly prefer modern processors anyway.
Comment by Andris Pavenis (andris) - Tuesday, 07 November 2017, 05:11 GMT
Though about tensorflow-cuda and tensorflow-cuda-opt came to my mind when I submitted report. It could be a possibility.

From other point of view people having i9 79[02468]0X CPus may want to use AVX512. Ideally it could be auto-detection at runtime and use what is actually available (example from different software: configure option --enable-fat for gmp). Such auto-detection is however out of scope here.
Comment by Jingbei Li (Petron) - Tuesday, 07 November 2017, 12:37 GMT
I get
F tensorflow/core/platform/cpu_feature_guard.cc:36] The TensorFlow library was compiled to use AVX2 instructions, but these aren't available on your machine.
on Intel(R) Xeon(R) CPU E5-2660 CPUs.

I think people doing ML with CUDA would prefer to upgrade their GPUs rather than CPUs. At least it is so in my university.
Comment by Sven-Hendrik Haase (Svenstaro) - Thursday, 09 November 2017, 10:06 GMT
Ok I decided to just build a set of opt-cuda packages. That should be good enough for most people.

Loading...