Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions code/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,14 @@ def do_tests():
import theano.gpuarray
if do_gpu:
theano.gpuarray.use('cuda')
# Make sure to initialize the blas kernel here to not count
# this time in the runs below.
import pygpu
a = pygpu.empty((2, 2), dtype='float32',
context=theano.gpuarray.type.get_context(None))
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not do this in theano/gpuarray/init.py use() function?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we could do it, yes.

pygpu.blas.gemm(0, a, a, 0, a, overwrite_c=True)
del a

gpu_times = do_tests()
times_dic['gpu'] = gpu_times
test_total += numpy.size(gpu_times)
Expand Down