[TF:XLA] remove re-initializations of Literals
It's an antipattern to have:
auto x = Literal::CreateFromShape(my_shape);
x->Populate();
as that results in initialization followed by reinitialization. Can be replaced
with:
auto x = MakeUnique<Literal>(my_shape);
x->Populate();
Suggested-by:
Kay Zhu <kayzhu@google.com>
PiperOrigin-RevId: 197007127
Loading
Please sign in to comment