Rollback an accidental change that sneaked into commit 8cc20b.
Outcome of that change: for tf.cond(pred, lambda: outside_compilation(A), lambda: outside_compilation(B)), the "Switch" node for input of A will have outside compilation attribute, and we will then mark the whole functionalize If node with outside compialtion attribute. This effectively turns original code into outside_compilation(tf.cond(pred, A, B)), which causes all inputs of A/B to be transferred from TPU to host unconditionally. We should still determine if the whole tf.cond() is in outside compilation by checking whether the predicate is in outside compilation. PiperOrigin-RevId: 262424903
This commit is contained in:
parent
615d59a925
commit
18616396a1
@ -787,7 +787,7 @@ Status Conditional::BuildIfNode(Graph* graph,
|
||||
|
||||
builder.Attr("Tcond", DT_BOOL);
|
||||
string outside_compilation;
|
||||
if (GetNodeAttr((*switches_.begin())->def(), kXlaOutsideCompilationAttrName,
|
||||
if (GetNodeAttr(predicate_.node->def(), kXlaOutsideCompilationAttrName,
|
||||
&outside_compilation)
|
||||
.ok()) {
|
||||
builder.Attr(kXlaOutsideCompilationAttrName, outside_compilation);
|
||||
|
Loading…
x
Reference in New Issue
Block a user