PROFESSIONAL-MACHINE-LEARNING-ENGINEER · Question #76
While monitoring your model training's GPU utilization, you discover that you have a native synchronous implementation. The training data is split into multiple files. You want to reduce the…
The correct answer is D. Add parallel interleave to the pipeline. To reduce input pipeline execution time for a synchronous implementation with data across multiple files, parallelizing file reading using interleave is the most effective solution.
Question
Options
- AIncrease the CPU load
- BAdd caching to the pipeline
- CIncrease the network bandwidth
- DAdd parallel interleave to the pipeline
How the community answered
(35 responses)- A3% (1)
- B9% (3)
- C6% (2)
- D83% (29)
Why each option
To reduce input pipeline execution time for a synchronous implementation with data across multiple files, parallelizing file reading using `interleave` is the most effective solution.
Increasing CPU load generally does not solve input pipeline bottlenecks; often, the goal is to reduce CPU load from inefficient processing or use it more effectively, not just increase it.
Adding caching to the pipeline helps performance on subsequent epochs but does not reduce the initial execution time of the first epoch or address the underlying synchronous nature of data loading.
Increasing network bandwidth might help if the data source is remote and network-bound, but for a synchronous pipeline reading from multiple files, the primary bottleneck is often sequential processing, which parallelization addresses more directly.
Adding parallel `interleave` to the pipeline allows it to read and process data from multiple files concurrently, which is crucial for speeding up data loading when data is split across many files and the current implementation is synchronous and likely bottlenecked by sequential I/O.
Concept tested: Optimizing `tf.data` input pipelines with parallel processing
Source: https://www.tensorflow.org/guide/data_performance#parallelize_data_extraction
Topics
Community Discussion
No community discussion yet for this question.