提交 5b0f3a16 authored 作者: James Bergstra's avatar James Bergstra

sparse - disabled the structureddot -> structureddotcsc optimization

1) scipy is as fast as our implementation now (+- 10%) 2) the optimized graph hides shape mismatches (and currently can cause a segfault)
上级 15bb0b8e
......@@ -1114,7 +1114,12 @@ def local_structured_dot(node):
a_val, a_ind, a_ptr, a_shape = csm_properties(a)
return [sd_csr(a_val, a_ind, a_ptr, b)]
return False
register_specialize(local_structured_dot)
# Commented out because
# a) it is only slightly faster than scipy these days, and sometimes a little slower, and
# b) the resulting graphs make it very difficult for an op to do size checking on the matrices
# involved. dimension mismatches are hard to detect sensibly.
#register_specialize(local_structured_dot)
def structured_dot_grad(sparse_A, dense_B, ga):
if sparse_A.type.format in ('csc','csr'):
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论