Intrigued by the art of cloud architecture? Discover how to design, develop, and manage robust, secure, scalable, and dynamic solutions on Google Cloud as you prepare for the Professional Cloud Architect exam!
Prepare and test your skills
Prepare and test your skills
Worked example. The correct answer is already marked and every option is explained below, so there is nothing to select here. To answer questions yourself, start the free trial.
A machine learning engineering team is training a large-scale deep learning model on Google Cloud TPU accelerators using TensorFlow. During performance profiling with TensorBoard, the team observes that the TPU cores experience frequent idle periods and low Matrix Multiply Unit (MXU) utilization.
Further analysis indicates that the TPU accelerator is waiting on frequent communication handshakes with the host CPU after every individual batch step.
Which configuration change should the team make to reduce host-device communication overhead and maximize training throughput?
steps_per_execution isIn TensorFlow Keras, the steps_per_execution parameter in Model.compile controls the number of consecutive training batches processed by accelerator hardware (such as Cloud TPUs or NVIDIA GPUs) inside a single execution loop before control and metrics are returned to the host CPU.
When training on dedicated hardware accelerators like Cloud TPUs, transferring execution context back to the host CPU introduces latency across the PCIe or interconnect bus:
steps_per_execution is set to 1, meaning a host callback occurs after every single training step.steps_per_execution (for example, setting it to 100 or the number of steps in an epoch) packages multiple forward and backward passes together.Increasing steps_per_execution directly targets the root cause of the performance bottleneck: excessive communication between the TPU server host CPU and the TPU accelerator device. It maximizes training throughput with a simple configuration adjustment in the high-level framework without degrading model convergence or accuracy.
Keep the momentum going with these hand-picked practice scenarios
Want more questions like this?
Get a free certification question every week.