[tf.data] Reduce locking in node processing-time calculations.
This change has two main parts: 1. Switch the `Node::processing_time_` to be a `std::atomic<int64>`, matching the other parameters, and remove the mutex acquisition from `add_processing_time()`. 2. Add `IteratorBase::model_node()` as a way to access the node pointer and prefix directly, instead of passing around prefix strings and looking up the node in `Model::lookup_table_` under the mutex for each use. In addition, it fixes some accounting errors where pooled threads would call `RecordStart()` without calling `RecordStop()`. PiperOrigin-RevId: 306546735 Change-Id: I9d7bd1e23b724602df643421cbc73df5b57b5791
Showing
想要评论请 注册 或 登录