提交 36d3c0b6 authored 作者: Frederic's avatar Frederic

In the memory profiler, use the shortly cut for the strides.

上级 4d44a0ac
...@@ -410,6 +410,9 @@ class Stack(VM): ...@@ -410,6 +410,9 @@ class Stack(VM):
if (getattr(o[0], 'flags', False) and if (getattr(o[0], 'flags', False) and
o[0].flags.c_contiguous): o[0].flags.c_contiguous):
st = 'c' st = 'c'
elif (hasattr(data[0], 'is_c_contiguous') and
data[0].is_c_contiguous()):
st = "c"
self.variable_strides[var] = st self.variable_strides[var] = st
except Exception: except Exception:
raise_with_op(current_apply, raise_with_op(current_apply,
...@@ -507,6 +510,9 @@ class Stack(VM): ...@@ -507,6 +510,9 @@ class Stack(VM):
if (getattr(o[0], 'flags', False) and if (getattr(o[0], 'flags', False) and
o[0].flags.c_contiguous): o[0].flags.c_contiguous):
st = 'c' st = 'c'
elif (hasattr(data[0], 'is_c_contiguous') and
data[0].is_c_contiguous()):
st = "c"
self.variable_strides[var] = st self.variable_strides[var] = st
input_index = [] input_index = []
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论