Commit 7ec44b75 authored by Justin Lebar's avatar Justin Lebar Committed by TensorFlower Gardener
Browse files

[XLA] Make HloModule::computations() return raw pointers.

Like HloComputation::instructions(), HloModule::computations() used to
return a list of unique_ptrs.  But this is an implementation detail that
shouldn't be leaked into the public API.

This patch also adds HloModule::MakeNonFusionComputations(), because
many of the callers of computations() went on to filter out all the
fusion computations.

It would be possible to implement MakeNonFusionComputations() "in place"
using a filtering iterator, but I don't think it's necessary -- we never
have *that* many computations, and since many callers go on to copy the
list of non-fusion computations, making it unconditionally a copy is
simpler and avoids a footgun.

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