2
を使用して存在しない。ないスピードアップは、私は、次のコードを使用して、マルチGPUの性能をテストしようマルチGPUを
test__multi.py
import time
import numpy as np
from numpy.random import random
import theano
import theano.tensor as T
from theano import shared
from theano import function
a = time.time()
v_00 = shared(
value=random((10240, 10240)).astype(theano.config.floatX, copy=False)
,target='dev0'
)
v_01 = shared(
value=random((10240, 10240)).astype(theano.config.floatX, copy=False)
,target='dev0'
)
v_10 = shared(
value=random((10240, 10240)).astype(theano.config.floatX, copy=False)
,target='dev1'
)
v_11 = shared(
value=random((10240, 10240)).astype(theano.config.floatX, copy=False)
,target='dev1'
)
b = time.time()
print b - a
f = function(inputs=[], outputs=[
theano.tensor.dot(v_00, v_01),
theano.tensor.dot(v_10, v_11)
]
)
c = time.time()
print c - b
res0, res1 = f()
d = time.time()
print d - c
添付画像が示したように、私は結果を得たときI、何improvmentは存在しません
[email protected]:~$ cd python
[email protected]:~/python$ THEANO_FLAGS='contexts=dev0->cuda0;dev1->cuda0' python test__multi.py
Mapped name dev0 to device cuda0: Tesla K80 (CuDNN not available)
Mapped name dev1 to device cuda0: Tesla K80 (CuDNN not available)
6.47632694244
0.34957909584
2.27110910416
[email protected]:~/python$ THEANO_FLAGS='contexts=dev0->cuda0;dev1->cuda1' python test__multi.py
Mapped name dev0 to device cuda0: Tesla K80 (CuDNN not available)
Mapped name dev1 to device cuda1: Tesla K80 (CuDNN not available)
6.49380016327
0.36678981781
2.40865397453