0Pricing
CUDA Academy · Lesson

Hints via cudaMemAdvise

Guiding the driver's placement choices.

Advise, Do Not Command

Prefetch moves data now; cudaMemAdvise instead tells the driver how you plan to use a region so it can place pages smartly over time.

The Call Shape

You pass the pointer, byte count, an advice flag, and a device id. The driver folds that hint into its future migration decisions.

cudaMemAdvise(data, bytes, advice, device);

All lessons in this course

  1. One Pointer, Both Sides
  2. On-Demand Page Migration
  3. Prefetching with cudaMemPrefetchAsync
  4. Hints via cudaMemAdvise
← Back to CUDA Academy