我遵循了https://datanoord.com/2016/02/01/setup-a-deep-learning-environment-on-windows-theano-keras-with-gpu-enabled/ 的所有指令,但似乎無法使它工作。nvcc fatal:在PATH中找不到編譯器'cl.exe',雖然Visual Studio 12.0被添加到PATH中
我已經加入 C:\ Program Files文件(x86)的\微軟的Visual Studio 12.0 \ VC \ BIN 到我的PATH變量
每次我從Theano網站運行代碼來測試是否CPU或GPU使用,它給了我「致命NVCC:在PATH找不到編譯器‘cl.exe時’」的 致命錯誤
下面是代碼我用來測試:
from theano import function, config, shared, sandbox
import theano.tensor as T
import numpy
import time
vlen = 10 * 30 * 768 # 10 x #cores x # threads per core
iters = 1000
rng = numpy.random.RandomState(22)
x = shared(numpy.asarray(rng.rand(vlen), config.floatX))
f = function([], T.exp(x))
print(f.maker.fgraph.toposort())
t0 = time.time()
for i in range(iters):
r = f()
t1 = time.time()
print("Looping %d times took %f seconds" % (iters, t1 - t0))
print("Result is %s" % (r,))
if numpy.any([isinstance(x.op, T.Elemwise) for x in f.maker.fgraph.toposort()]):
print('Used the cpu')
else:
print('Used the gpu')
我怎樣才能解決這個?
請提供包括回溯完整的錯誤消息。否則,很難確定並解決您的問題。 – Lorrit