提交 6d1b921e authored 作者: Frederic's avatar Frederic

Make check_blas.py not use a profiler.

上级 0bd3ed96
...@@ -68,12 +68,13 @@ def execute(execute=True, verbose=True, M=2000, N=2000, K=2000, ...@@ -68,12 +68,13 @@ def execute(execute=True, verbose=True, M=2000, N=2000, K=2000,
order=order)) order=order))
c = theano.shared(numpy.ones((M, K), dtype=theano.config.floatX, c = theano.shared(numpy.ones((M, K), dtype=theano.config.floatX,
order=order)) order=order))
f = theano.function([], updates=[(c, 0.4 * c + .8 * T.dot(a, b))], f = theano.function([], updates=[(c, 0.4 * c + .8 * T.dot(a, b))])
mode=theano.compile.ProfileMode())
if any([x.op.__class__.__name__ == 'Gemm' for x in if any([x.op.__class__.__name__ == 'Gemm' for x in
f.maker.fgraph.toposort()]): f.maker.fgraph.toposort()]):
c_impl = f.profile.apply_cimpl.values() c_impl = [hasattr(thunk, 'cthunk')
for node, thunk in zip(f.fn.nodes, f.fn.thunks)
if node.op.__class__.__name__ == "Gemm"]
assert len(c_impl) == 1 assert len(c_impl) == 1
if c_impl[0]: if c_impl[0]:
impl = 'CPU (with direct Theano binding to blas)' impl = 'CPU (with direct Theano binding to blas)'
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论