提交 a24027b2 authored 作者: Frederic's avatar Frederic

in memory profile, mark the CudaNdarray object strides as c when it is the case.

上级 dee95ece
...@@ -333,6 +333,9 @@ class Stack(VM): ...@@ -333,6 +333,9 @@ class Stack(VM):
st = getattr(data[0], 'strides', 'input no strides') st = getattr(data[0], 'strides', 'input no strides')
if getattr(data[0], 'flags', False) and data[0].flags.c_contiguous: if getattr(data[0], 'flags', False) and data[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
while apply_stack: while apply_stack:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论