2016-05-22 18 views
6

Podążyłem za wszystkimi instrukcjami od https://datanoord.com/2016/02/01/setup-a-deep-learning-environment-on-windows-theano-keras-with-gpu-enabled/ , ale wydaje się, że to nie działa.nvcc fatal: Nie można znaleźć kompilatora 'cl.exe' w PATH, chociaż Visual Studio 12.0 dodano do PATH

Dodałem C: \ Program Files (x86) \ Microsoft Visual Studio 12.0 \ VC \ bin na mojej ścieżce zmiennej

każdym razem, gdy uruchomić kod ze strony Theano przetestować, czy CPU lub GPU jest używany, to daje mi błąd krytyczny z „nvcc krytyczny: nie można odnaleźć kompilatora«cl.exe»w ścieżce”

Oto kod używać do badania:

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') 

Jak mogę rozwiązać to?

+0

Proszę podać pełny komunikat o błędzie w tym traceback. Inaczej trudno jest zidentyfikować i rozwiązać problem. – Lorrit

Odpowiedz

4

Miałem ten sam problem. Używam 64-bitowy Windows 8.1 i musiałem dodać następujące mojej ścieżce i teraz działa dobrze:

C: \ Program Files (x86) \ Microsoft Visual Studio 12.0 \ VC \ bin \ amd64

C: \ Program Files (x86) \ Microsoft Visual Studio 12.0 \ VC \ bin \ amd64 \ cl.exe

Nadzieja to pomaga

Powiązane problemy