[tf.data] Ensure that all needed functions are available when initializing an iterator.
Previously, the function library would be captured when an `IteratorResource` is first created, which would mean that it is unable to use dataset containing functions defined subsequently, and (e.g.) initialized via a reinitializable iterator. This change moves function library capturing to the `MakeIteratorOp`, which runs in the same graph as the `Dataset` kernels that define the dataset. This CL also cleans up the locking in `IteratorResource`, and fixes a potential data race when an iterator is being simultaneously used and restored. Fixes #23334. PiperOrigin-RevId: 221484449
Loading
Please sign in to comment