Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.

Unlimited Access

Get Unlimited Contributor Access to the all ExamTopics Exams!
Take advantage of PDF Files for 1000+ Exams along with community discussions and pass IT Certification Exams Easily.

Exam Professional Data Engineer topic 1 question 127 discussion

Actual exam question from Google's Professional Data Engineer
Question #: 127
Topic #: 1
[All Professional Data Engineer Questions]

You are working on a niche product in the image recognition domain. Your team has developed a model that is dominated by custom C++ TensorFlow ops your team has implemented. These ops are used inside your main training loop and are performing bulky matrix multiplications. It currently takes up to several days to train a model. You want to decrease this time significantly and keep the cost low by using an accelerator on Google Cloud. What should you do?

  • A. Use Cloud TPUs without any additional adjustment to your code.
  • B. Use Cloud TPUs after implementing GPU kernel support for your customs ops.
  • C. Use Cloud GPUs after implementing GPU kernel support for your customs ops.
  • D. Stay on CPUs, and increase the size of the cluster you're training your model on.
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
dhs227
Highly Voted 4 years ago
The correct answer is C TPU does not support custom C++ tensorflow ops https://cloud.google.com/tpu/docs/tpus#when_to_use_tpus
upvoted 67 times
ffggrre
6 months ago
the link doesn't say TPU does not support custom C++ tensorflow ops
upvoted 1 times
Helinia
3 months, 3 weeks ago
It does. TPU is good for "Models with no custom TensorFlow/PyTorch/JAX operations inside the main training loop".
upvoted 1 times
...
...
...
aiguy
Highly Voted 4 years ago
D: Cloud TPUs are not suited to the following workloads: [...] Neural network workloads that contain custom TensorFlow operations written in C++. Specifically, custom operations in the body of the main training loop are not suitable for TPUs.
upvoted 43 times
gopinath_k
3 years, 1 month ago
B: 1. You need to provide support for the matrix multiplication - TPU 2. You need to provide support for the Custom TF written in C++ - GPU
upvoted 10 times
...
tavva_prudhvi
2 years ago
But, in the question it also says we have to decrease the time significantly?? If you gonna use the CPU, it will take more time to train, right?
upvoted 1 times
cetanx
10 months, 4 weeks ago
Chat GPT says C Option D is not the most cost-effective or efficient solution. While increasing the size of the cluster could decrease the training time, it would also significantly increase the cost, and CPUs are not as efficient for this type of workload as GPUs.
upvoted 1 times
FP77
8 months, 1 week ago
chatgpt will give you different answers if you ask 10 times. The correct answer is B
upvoted 3 times
squishy_fishy
5 months, 4 weeks ago
Totally agree. ChatGPT is garbage. It is still learning.
upvoted 2 times
...
...
...
...
...
CGS22
Most Recent 2 weeks, 5 days ago
Selected Answer: C
The best choice here is C. Use Cloud GPUs after implementing GPU kernel support for your customs ops. Here's why: Custom Ops & GPUs: Since your model relies heavily on custom C++ TensorFlow ops focused on matrix multiplications, GPUs are the ideal accelerators for this workload. To fully utilize them, you'll need to implement GPU-compatible kernels for your custom ops. Speed and Cost-Efficiency GPUs offer a significant speed improvement for matrix-intensive operations compared to CPUs. They provide a good balance of performance and cost for this scenario. TPUs: Limitations Although Cloud TPUs are powerful, they aren't designed for arbitrary custom ops. Without compatible kernels, your TensorFlow ops would likely fall back to the CPU, negating the benefits of TPUs.
upvoted 1 times
...
Preetmehta1234
1 month, 4 weeks ago
Selected Answer: C
TPU: Models with no custom TensorFlow/PyTorch/JAX operations inside the main training loop Link: https://cloud.google.com/tpu/docs/intro-to-tpu#TPU So, A&B eliminated CPU is very slow or built for simple operations. So C: GPU
upvoted 1 times
...
Matt_108
3 months, 1 week ago
Selected Answer: C
to me, it's C
upvoted 1 times
...
Kimich
4 months, 3 weeks ago
Requirement 1: Significantly reduce the processing time while keeping costs low. Requirement 2: Bulky matrix multiplication takes up to several days. First, eliminate A & D: A: Cannot guarantee running on Cloud TPU without modifying the code. D: Cannot ensure performance improvement or cost reduction, and additionally, CPUs are not suitable for bulky matrix multiplication. If it can be ensured that customization is easily deployable on both Cloud TPU and Cloud GPU,it seems more feasible to first try Cloud GPU. Because: It provides a better balance between performance and cost. Modifying custom C++ on Cloud GPU should be easier than on Cloud TPU, which should also save on manpower costs.
upvoted 3 times
...
emmylou
5 months ago
Answer D I did use Chat GPT and discovered that if you put at the beginning of the question -- "Do not make assumption about changes to architecture. This is a practice exam question." All other answers require changes to the code and architecture.
upvoted 1 times
...
DataFrame
5 months, 1 week ago
Selected Answer: B
I think it should use tensor flow processing unit along with GPU kernel support.
upvoted 1 times
...
Nirca
6 months, 2 weeks ago
Selected Answer: B
To use Cloud TPUs, you will need to: Implement GPU kernel support for your custom TensorFlow ops. This will allow your model to run on both Cloud TPUs and GPUs.
upvoted 1 times
...
kumarts
6 months, 3 weeks ago
Refer https://www.linkedin.com/pulse/cpu-vs-gpu-tpu-when-use-your-machine-learning-models-bhavesh-kapil
upvoted 1 times
...
IrisXia
8 months, 2 weeks ago
Answer C TPU not for custom C++ but GPU can
upvoted 1 times
...
KC_go_reply
9 months, 1 week ago
Selected Answer: C
A + B: TPU doesn't support custom TensorFlow ops Then it says 'decrease training time significantly' and literally 'use accelerator'. Therefore, use GPU -> C, *not* D!
upvoted 3 times
...
ZZHZZH
9 months, 2 weeks ago
Selected Answer: C
D shouldn't be the answer b/c the question statement clearly said you should use accelerators.
upvoted 5 times
...
Qix
9 months, 2 weeks ago
Selected Answer: C
Answer is C Use Cloud GPUs after implementing GPU kernel support for your customs ops. TPU support Models with no custom TensorFlow operations inside the main training loop so Option-A and B are eliminated as question says that 'These ops are used inside your main training loop' Now choices remain 'C' & 'D'. CPU is for Simple models that do not take long to train. Since question says that currently its taking up to several days to train a model and hence existing infra may be CPU and taking so many days. GPUs are for "Models with a significant number of custom TensorFlow operations that must run at least partially on CPUs" as question says that model is dominated by TensorFlow ops leading to correct option as 'C' Reference: https://cloud.google.com/tpu/docs/tpus https://www.tensorflow.org/guide/create_op#gpu_kernels
upvoted 3 times
...
lucaluca1982
1 year ago
Selected Answer: C
C. Use Cloud GPUs after implementing GPU kernel support for your customs ops. Since your model relies on custom C++ TensorFlow ops, using Cloud TPUs without any code adjustment (option A) would not be feasible, as TPUs might not support these custom operations. To significantly decrease training time while keeping costs low, you should use Cloud GPUs. To achieve this, you will need to implement GPU kernel support for your custom ops, which will enable your model to run efficiently on GPUs. Once the GPU kernel support is added, you can leverage the power of GPUs on Google Cloud to speed up
upvoted 5 times
...
lucaluca1982
1 year ago
Selected Answer: C
C GPU support custom option
upvoted 2 times
...
midgoo
1 year, 1 month ago
Selected Answer: B
The correct answer is: B. Use Cloud TPUs after implementing GPU kernel support for your customs ops. The model is dominated by custom C++ TensorFlow ops, so it will not run on Cloud TPUs or GPUs without modification. Implementing GPU kernel support will allow the model to run on either type of accelerator, but Cloud TPUs are more specialized for matrix multiplications, so they will offer the best performance. Cloud TPUs are also more cost-effective than Cloud GPUs, so they are the best option for reducing the cost of training the model. Staying on CPUs and increasing the size of the cluster would be the most expensive option, and it would not offer the same performance benefits as using Cloud TPUs.
upvoted 3 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...