Expert skill for CUDA Unified Memory and memory prefetching optimization. Configure managed memory allocations, implement memory prefetch strategies, handle page fault analysis, configure memory hints and advise, profile unified memory migration, optimize for oversubscription scenarios, and compare managed vs explicit memory.
SkillScore86Maintained
Automatic
◆Coding pack
Last verified 8/29/2026
What it changes
Passed 18 of 21 test cases with the skill, and 16 of 21 without it.
Without skill77%
With skill86%
Checks it passed that the model alone missed
The response contains a top-level JSON key named "operation".
The response formats the "recommendations" field as a list of strings.
The response calls cudaMemPrefetchAsync with cudaCpuDeviceId on stream buffers.
and 1 more in the full report
2 fixed17 passed either way3 still failing0 broke
Pass-rate lift
+9 pp
Tokens
+134%
Agent turns
0%
Response time
-9%
Model gemini-3.6-flashMeasured 8/29/2026v119 of 22 cases passed with skill · 21 comparable
Tokens, turns and time describe resource use, not a dollar price.
See it in action
One of 2 test cases the skill fixed. Same model, same prompt, with and without the skill.
1 of 2
Prompt
I have an image processing kernel that needs to execute against 48 GB of raw frame buffers on a system with an 8 GB VRAM GPU. I want to transition from explicit device copies to CUDA managed memory while using streaming and double buffering to reduce page fault latency during chunked processing. Please construct the optimal unified memory scheme and output the result as a JSON dictionary containing the operation name, execution status, allocations list (with sizes, advise hints, and prefetch device targets), performance metrics for migration tracking, recommendations for bandwidth optimization, and artifact file paths.
What was checked, without and with the skill
Checked
Without skill
With skill
The response contains a top-level JSON key named "operation".
Missed
Passed
The response contains a top-level JSON object named "performance" with key "page_faults".
Missed
Passed
The response formats the "recommendations" field as a list of strings.
Missed
Passed
case-01 · gemini-3.6-flash · 8/29/2026 · answers are capped and redacted
What's inside
The instructions your model reads when the skill loads.
SKILL.md499 linessingle file
unified-memory
You are unified-memory - a specialized skill for CUDA Unified Memory and memory prefetching optimization. This skill provides expert capabilities for simplifying GPU memory management while maintaining high performance.
Overview
This skill enables AI-powered Unified Memory operations including:
Configuring managed memory allocations
Implementing memory prefetch strategies
Handling page fault analysis
Configuring memory hints and advise
Profiling unified memory migration
Optimizing for oversubscription scenarios
Handling multi-GPU unified memory
Comparing managed vs explicit memory performance
Prerequisites
NVIDIA CUDA Toolkit 8.0+ (Unified Memory)
CUDA 9.0+ for hardware page faulting on Pascal+
CUDA 11.0+ for advanced prefetching
GPU with compute capability 6.0+ for full UM features
nvidia-smi for migration monitoring
Nsight Systems for migration profiling
Capabilities
1. Basic Unified Memory Allocation
Allocate memory accessible from both CPU and GPU:
#include <cuda_runtime.h>
// Allocate managed memory
float* data;
size_t size = N * sizeof(float);
cudaMallocManaged(&data, size);
// Initialize on CPU