Replace list concatenation with generators for auto control deps
This commit is contained in:
parent
e7cc47384f
commit
4c90f20c0d
|
@ -535,8 +535,10 @@ def _get_resource_inputs(op):
|
||||||
|
|
||||||
# Note: A resource handle that is not written to is treated as read-only. We
|
# Note: A resource handle that is not written to is treated as read-only. We
|
||||||
# don't have a special way of denoting an unused resource.
|
# don't have a special way of denoting an unused resource.
|
||||||
return ([(t, ResourceType.READ_ONLY) for t in reads] +
|
for t in reads:
|
||||||
[(t, ResourceType.READ_WRITE) for t in writes])
|
yield (t, ResourceType.READ_ONLY)
|
||||||
|
for t in writes:
|
||||||
|
yield (t, ResourceType.READ_WRITE)
|
||||||
|
|
||||||
|
|
||||||
def automatic_control_dependencies(f):
|
def automatic_control_dependencies(f):
|
||||||
|
|
Loading…
Reference in New Issue