Commit f2a44bc8 authored by Mingsheng Hong's avatar Mingsheng Hong Committed by TensorFlower Gardener
Browse files

Relaxed the functional If op to allow no outputs.

One use case is that in Swift for TensorFlow, we generate an If op that's
executed only for its side effects.

The Swift level code looks like:

if some_cond {
  sendTensorToHost(1.0)
} else {
  sendTensorToHost(2.0)
}

Currently we hit the following error in TF, because a attr list by default
requires a length of >=1.

PiperOrigin-RevId: 203063925
parent 9c5a44a1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment