Я хочу собрать Tensorflow C ++ на Windows 10, используя CMake.Однако я не могу пройти тест COMPILER_OPT_ARCH_NATIVE_SUPPORTED, что привело к неудачным попыткам сборки.Вот мой открытый вопрос о репозитории tf github: https://github.com/tensorflow/tensorflow/issues/24076,, который не получил ответа, поэтому я спрашиваю о stackoverflow и, надеюсь, кто-то здесь сможет меня просветить.У меня заканчиваются идеи сейчас.Я пробовал Python 3.5 и 3.6, visual studio 2017 и 2015. Все безуспешно.
Информация о системе
Платформа и распространение ОС (например, Linux Ubuntu 16.04): Windows 10
TensorFlow установлена из (источника или двоичного файла): источник
- Версия TensorFlow: последняя версия
- версия Python: 3.6
- версия Bazel (при компиляции из источника): я использую версию CMake
- GCC / Compiler (при компиляции из источника): gcc 6.30
- Версия CUDA / cuDNN: установка только версии процессора
- Я также использую Microsoft Visual Studio Community 2017 версии 15.9.3, кстати
Опишите проблему IЯ следую «Пошаговой сборке Windows» из https://github.com/tensorflow/tensorflow/tree/master/tensorflow/contrib/cmake. Однако на шаге 3 я не могу пропустить Performing Test COMPILER_OPT_ARCH_NATIVE_SUPPORTED
, что привело к сбою процесса сборки.
Укажите точную последовательность команд / шагов, которые вы выполнили перед тем, как столкнуться с проблемой
PS C:\Users\bw\tensorflow\tensorflow\contrib\cmake\build> cmake .. -A x64 -Thost=x64 -DCMAKE_BUILD_TYPE=Release `
>> -DSWIG_EXECUTABLE='C:\Program Files\swigwin-3.0.12\swig.exe' `
>> -DPYTHON_EXECUTABLE='C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\python.exe' `
>> -DPYTHON_LIBRARIES='C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\libs\python36.lib'
-- Building for: Visual Studio 15 2017
CMake Warning at CMakeLists.txt:9 (message):
Your current cmake generator is set to use 32 bit toolset architecture.
This may cause "compiler out of heap space" errors when building. Consider
using the flag -Thost=x64 when running cmake.
-- The C compiler identification is MSVC 19.16.27024.1
-- The CXX compiler identification is MSVC 19.16.27024.1
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx64/x64/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx64/x64/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx64/x64/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx64/x64/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test COMPILER_OPT_ARCH_NATIVE_SUPPORTED
-- Performing Test COMPILER_OPT_ARCH_NATIVE_SUPPORTED - Failed
-- Performing Test MSVC_OPENMP_SUPPORT
-- Performing Test MSVC_OPENMP_SUPPORT - Success
-- Found PythonInterp: C:/Program Files (x86)/Microsoft Visual Studio/Shared/Python36_64/python.exe (found version "3.6.7")
-- Found PythonLibs: optimized;C:/Program Files (x86)/Microsoft Visual Studio/Shared/Python36_64/libs/python36.lib;debug;C:/Program Files (x86)/Microsoft Visual Studio/Shared/Python36_64/libs/python36_d.lib (found version "3.6.7")
-- Found SWIG: C:/Program Files/swigwin-3.0.12/swig.exe (found version "3.0.12")
CMake Error at tf_python.cmake:811 (string):
string sub-command REPLACE requires at least four arguments.
Call Stack (most recent call first):
CMakeLists.txt:583 (include)
CMake Error at tf_python.cmake:812 (string):
string sub-command REPLACE requires at least four arguments.
Call Stack (most recent call first):
CMakeLists.txt:583 (include)
CMake Error at tf_python.cmake:813 (string):
string sub-command REPLACE requires at least four arguments.
Call Stack (most recent call first):
CMakeLists.txt:583 (include)
-- Configuring incomplete, errors occurred!
See also "C:/Users/bw/tensorflow/tensorflow/contrib/cmake/build/CMakeFiles/CMakeOutput.log".
See also "C:/Users/bw/tensorflow/tensorflow/contrib/cmake/build/CMakeFiles/CMakeError.log".
Любая другая информация / журналы
CMakeOutput.log: https://www.dropbox.com/s/7fweyunxdbmxa1k/CMakeOutput.log?dl=0 CMakeError.log: https://www.dropbox.com/s/tucx0tl6346kdpd/CMakeError.log?dl=0