提交 9c9fe6cc authored 作者: lamblin's avatar lamblin

Merge pull request #555 from nouiz/mixed

Mixed
......@@ -512,3 +512,26 @@ import theano and print the config variable, as in:
A. Elemwise{add_no_inplace}
B. log_likelihood_v_given_h
C. log_likelihood_h
.. attribute:: config.time_seq_optimizer
Bool value, default: False
Should all SeqOptimizer object print the time taked by each of its
optimizer. Each SeqOptimizer print something like this:
SeqOptimizer gpu_opt time 0.014s for 8/9 nodes before/after optimization
[(0.0004410743713378906, ('InputToGpuOptimizer',
'InputToGpuOptimizer')), (0.0013730525970458984,
('gpu_cut_transfers', 'EquilibriumOptimizer')),
(0.012573957443237305, ('gpu_local_optimizations',
'EquilibriumOptimizer'))]
This print the name of the SeqOptimizer (gpu_opt), the number of
Apply node in the graph before (8) and after (9)
optimizations. Then a list of tuple with 1 tuple by optimization
in this SeqOptimizer. The first element of the tuple is the time
by this optimization and then it is a tuple with the name of the
optimization and this class. This list is sorted from the sub
optimization that take the most time to the optimization that take
the less time.
......@@ -193,7 +193,8 @@ def test_softmax_with_bias():
if not catch:
raise
assert (e.args[0] ==
'Cuda error: kSoftmax_node_0: invalid configuration argument.\n')
'Cuda error: kSoftmaxWithBias_node_0: invalid configuration argument.\n'
), e.args[0]
cmp(2, 5)
#we need to test n>32*1024 to check that we make the block loop.
cmp(2 << 15, 5)
......
......@@ -20,10 +20,12 @@ def test_local_csm_properties_csm():
data = tensor.vector()
indices, indptr, shape = (tensor.ivector(), tensor.ivector(),
tensor.ivector())
mode = theano.compile.mode.get_default_mode()
mode = mode.including("specialize", "local_csm_properties_csm")
for CS, cast in [(CSC, sp.csc_matrix), (CSR, sp.csr_matrix)]:
f = theano.function([data, indices, indptr, shape],
csm_properties(CS(data, indices, indptr, shape)))
csm_properties(CS(data, indices, indptr, shape)),
mode=mode)
#theano.printing.debugprint(f)
assert not any(isinstance(node.op, (CSM, CSMProperties)) for node
in f.maker.env.toposort())
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论