提交 11f545a3 authored 作者: Frederic Bastien's avatar Frederic Bastien

correctly put all gpu op into gpu time part in the profilemode.

上级 7b2b0f66
......@@ -390,14 +390,14 @@ class ProfileMode(Mode):
if any(hasattr(i,'dtype') and i.dtype=='float64' for i in node.outputs) and not any(hasattr(i,'dtype') and i.dtype=='float64' for i in node.inputs):
print str(node), idx, fct.name, str([getattr(i,'dtype',None) for i in node.inputs]),str([getattr(i,'dtype',None) for i in node.outputs])
if any([x[2].__name__.startswith("Gpu") for x in sotimes]):
if any([x[2].__name__.lower().startswith("gpu") for x in sotimes]):
cpu=[]
gpu=[]
trans=[]
for so in sotimes:
if so[2].__name__ in ["HostFromGpu", "GpuFromHost"]:
trans.append(so)
elif so[2].__name__.startswith("Gpu"):
elif so[2].__name__.lower().startswith("gpu"):
gpu.append(so)
else:
cpu.append(so)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论