A GPU feature pipeline is slower than expected. Profiling shows most time in reading CSV files. What optimization helps most?
- Exam domain
- MLOps19% of the exam
- Difficulty
- Medium
- In this mock
- 10 questions on this domainPractise this domain
Why the exam asks this
Objective in the exam guide: Performing benchmarking and optimizing different GPU-accelerated workflows
Optimizing GPU workflows after benchmarking is named.
Why C is the answer
Convert the source data to Parquet and read only needed columns
CSV parsing is slow and reads every column. Parquet is columnar and compressed, so reading only needed columns is much faster.
Remember: Optimize the bottleneck: CSV to Parquet.
How it works
Benchmark results point to optimizations such as better file formats.
In detail
- Fix the measured bottleneck.
- Parquet for analytical reads.
Every option, checked
Knowing why each wrong option fails is how you rule it out on exam day.
A. Read the files twice to warm the cacheWrong
Double reads waste time.
B. Buy a GPU with more cores so the parsing work finishes faster on the deviceWrongMost tempting
More cores do not fix I/O format overhead.
Why it tempts: More GPU power is the reflex.
C. Convert the source data to Parquet and read only needed columnsRight
Optimize the bottleneck: CSV to Parquet.
D. Add more loggingWrong
Logging adds time.
Use case
An illustrative scenario, not a real incident.
Illustrative: Parquet with column selection cuts read time from 6 minutes to 25 seconds.
See it in different ways
flowchart LR S0["Profile"] --> S1["See CSV read cost"] --> S2["Convert to Parquet"] --> S3["Select columns"] --> S4["Re-benchmark"]
How to read this chart
- Read it in order: Profile, then See CSV read cost, then Convert to Parquet, then Select columns, then Re-benchmark.
flowchart TD
Q{"Profile result?"}
Q -->|"Reading files"| A0["Parquet and column selection"]
Q -->|"Compute"| A1["GPU kernels or dtypes"]How to read this chart
- At "Profile result?": if "Reading files", go to "Parquet and column selection"; if "Compute", go to "GPU kernels or dtypes".