提交 1d899ee9 authored 作者: Ricardo's avatar Ricardo 提交者: Brandon T. Willard

Allow type of shared variable updates to have more specialized shape information

Otherwise TestSharedOptions.test_specify_shape_inplace would fail
上级 ddd73220
...@@ -189,11 +189,8 @@ def rebuild_collect_shared( ...@@ -189,11 +189,8 @@ def rebuild_collect_shared(
(store_into, update_d[store_into]), (store_into, update_d[store_into]),
) )
# filter_variable ensure smooth conversion of cpu Types
try: try:
update_val = store_into.type.filter_variable( update_val = store_into.type.filter_variable(update_val, allow_convert=True)
update_val, allow_convert=False
)
except TypeError: except TypeError:
err_msg = ( err_msg = (
"An update must have the same type as the" "An update must have the same type as the"
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论