NCA-GENL domain - 22% of the exam

Experimentation

Experimentation is 22% of the NVIDIA-Certified Associate: Generative AI LLMs (NCA-GENL) exam. These are the objectives it covers, each with practice questions and worked explanations.

Objectives in this domain

Sample question from this domain

Free sampleExperimentationmedium

A PyTorch training pipeline loads a large image dataset. Profiling shows the GPU sits idle for several hundred milliseconds between batches. The DataLoader currently uses num_workers=0. Which configuration change will most directly reduce the inter-batch GPU idle time?

  • AIncrease the batch size substantially so each GPU kernel runs longer, amortising the fixed per-batch data transfer overhead across more samples per step.
  • BReplace the default collate function with a custom one that stacks tensors directly on the GPU, removing the explicit host-to-device copy step from inside the training loop.
  • CMove the entire dataset into GPU VRAM at the start of training using a pre-loaded TensorDataset so that each batch requires no host-to-device transfer during the loop.
  • DSet num_workers to a value greater than zero and enable pin_memory=True so that background worker processes prefetch batches while the GPU trains, and pinned memory enables faster asynchronous DMA transfers. Correct
Understand how DataLoader num_workers and pin_memory settings overlap data prefetching with GPU computation to reduce inter-batch idle time. When num_workers=0 the main training thread calls the DataLoader iterator synchronously, blocking until each batch is fully loaded, decoded, augmented, and collated before the GPU can begin the next forward pass. This serialisation causes the GPU to sit idle during every batch preparation phase. Setting num_workers to a positive integer spawns separate worker processes that load and preprocess the next batch while the GPU processes the current one. pin_memory=True allocates the CPU-side output tensors in page-locked (pinned) host memory, which allows the CUDA DMA engine to initiate asynchronous transfers with higher bandwidth than pageable memory. Together, these two settings overlap CPU-side loading with GPU-side computation and directly eliminate the idle gap observed during profiling.

Why A is wrong: A larger batch size reduces the number of host-to-device transfers per epoch but does not introduce prefetching. The root cause is that data loading is sequential and blocking, and increasing batch size does not change that. It may also cause out-of-memory errors or destabilise training.

Why B is wrong: DataLoader workers run in forked processes that cannot share CUDA contexts in the standard configuration; attempting to create GPU tensors inside a worker raises a RuntimeError. Tensors must be transferred to the GPU inside the main training loop, not during collation in the worker process.

Why C is wrong: Pre-loading a large image dataset into GPU VRAM is not feasible; VRAM capacity is far smaller than typical dataset sizes and the approach fails with an out-of-memory error. It also prevents standard CPU-side augmentation pipelines from running, limiting training data diversity.

Why D is correct: With num_workers=0, the main process blocks on each batch load before resuming the training loop, serialising CPU work and GPU computation. Setting num_workers greater than zero spawns workers that prepare the next batch in parallel. pin_memory=True allocates output tensors in page-locked host memory, enabling the CUDA DMA engine to transfer them asynchronously with higher bandwidth, further overlapping data preparation with GPU execution.

Other domains in this exam

See also the NCA-GENL cert hub, the study guide, and the cheat sheet.

Examworthy is not affiliated with or endorsed by NVIDIA. Original, blueprint-aligned practice material only.