Windows上的Tensorflow自定义编译 [英] Tensorflow Custom Compile on Windows

查看:156
本文介绍了Windows上的Tensorflow自定义编译的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因此,我已经通过Chocolatey安装了Bazel,安装了Python 3.5和2.7,安装了CUDA v8和cuDNN v6,并安装了JDK 8.0,我现在正尝试在Windows 10设备上使用AVX自定义构建TensorFlow. ,AVX 2和CUDA.预构建版本TensorFlow-GPU可以正常工作,我已经测试并成功运行了它.

So, I've installed Bazel via Chocolatey, installed Python 3.5 and 2.7, installed CUDA v8, and cuDNN v6, and installed JDK 8.0, I'm now trying to custom-build TensorFlow on my Windows 10 device, with AVX, AVX 2 and CUDA. TensorFlow-GPU, the pre-built version, does work, I've already tested and run that successfully.

我已经在TensorFlows的实际站点(尝试改编Linux/Mac安装中的某些部分)以及此处的其他文章中进行了说明.我做的最远的是通过Msys2克隆Github存储库,运行configure.py,然后尝试通过bazel build --config=opt --config=cuda //tensorflow/tools/pip_package:build_pip_package进行构建,我收到一个错误,该错误的标头是:

I've followed the instructions of other articles, both on TensorFlows' actual site (trying to adapt some sections from the Linux/Mac installs), and on here. The furthest I've made it is; cloning the Github repository via Msys2, running configure.py, then attempting to build via bazel build --config=opt --config=cuda //tensorflow/tools/pip_package:build_pip_package I receive an error, the header of which is:

读取java.io.IOException时出错:CreateProcess():系统找不到指定的文件. :C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v8.0/include/cudnn.h

Error reading java.io.IOException: CreateProcess(): The system cannot find the file specified. : C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v8.0/include/cudnn.h

我已经仔细检查过,该文件确实存在,所以我不确定为什么会收到此错误.

I've double checked, that file does exist, so I'm not sure why I'm getting this error.

也尝试通过Powershell运行,达到了同一点.

Also attempted to run via Powershell, reached the same point.

任何帮助将不胜感激.

推荐答案

在尝试在Windows(使用cuDNN 5.1)上构建Tensorflow时,我遇到了完全相同的错误.我通过从msys2终端(而不是从Windows命令提示符)启动bazel并在尝试进行构建之前手动设置了BAZEL_SH环境变量来修复了该问题.

I had the exact same error while trying to build Tensorflow on Windows (using cuDNN 5.1). I fixed it by launching bazel from the msys2 terminal (instead of from the windows command prompt) and manually setting the BAZEL_SH environment variable before attempting to build.

export BAZEL_SH=c:/tools/msys64/usr/bin/bash.exe
bazel build -c opt --config=win-cuda tensorflow/cc:cc_ops

这篇关于Windows上的Tensorflow自定义编译的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆