提交 9e918cc9 authored 作者: Pascal Lamblin's avatar Pascal Lamblin

Cosmetic change.

上级 9483c7c5
......@@ -516,41 +516,41 @@ Test them first as they are not guaranteed to always provide a speedup."""
l = list_scalar_op(op)
return any([s_op.__class__ in [scal.Exp] for s_op in l])
gived_tip = False
printed_tip = False
#tip 1
if config.floatX=='float64':
print " - Try the Theano flag floatX=float32"
gived_tip = True
printed_tip = True
#tip 2
if not config.lib.amdlibm and any([amdlibm_speed_up(a.op) for i,a in apply_time]):
print " - Try installing amdlibm and set the Theano flag lib.amdlibm=True. This speed up only some Elemwise operation."
gived_tip = True
printed_tip = True
#tip 3
if not config.lib.amdlibm and any([exp_float32_op(a.op) and a.inputs[0].dtype=='float32' for i,a in apply_time]):
print " - With the default gcc libm, exp in float32 is slower then in float64! Try Theano flags floatX=float64 or install amdlibm and set the theano flags lib.amdlibm=True"
gived_tip = True
printed_tip = True
#tip 4
for a, t in apply_time.iteritems():
node = a[1]
if isinstance(node.op, T.Dot) and all([ len(i.type.broadcastable)==2 for i in node.inputs]):
print " - You have a dot operation that was not optimized to dot22 that is faster. Make sure the inputs are float32 or 64 and are the same for both input. Currently they are:",[i.type for i in node.inputs]
gived_tip = True
printed_tip = True
#tip 5
for a, t in apply_time.iteritems():
node = a[1]
if isinstance(node.op, RandomFunction):
gived_tip = True
printed_tip = True
print " - Replace the default random number generator by 'from theano.sandbox.rng_mrg import MRG_RandomStreams as RandomStreams' as this is is faster. It is still experimental, but seam to work correctly."
if config.device.startswith("gpu"):
print " - MRG_RandomStreams is the only random number supported on the GPU."
break
if not gived_tip:
print " Sorry no tip for today."
if not printed_tip:
print " Sorry, no tip for today."
register_mode('PROFILE_MODE',ProfileMode())
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论