matlab-setup-gpu
Detect and validate GPU availability for MATLAB GPU computing
Install / Use
npx skills add matlab/matlab-agentic-toolkit --skill matlab-setup-gpuInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
Customer SupportSupported Platforms
Tags
Our assessment of matlab-setup-gpu
matlab-setup-gpu scores 88/100 on our quality scale, 190th of 319 Customer Support skills we index.
Its SKILL.md is 5.9 KB long, well organised into 13 sections with 5 code examples: a thorough specification that gives an agent plenty to work with.
With 1,098 GitHub stars, it is one of the more widely adopted skills in the catalogue.
Maintenance, license and trust
- The repository was last updated 21 days ago, so matlab-setup-gpu is actively maintained.
- No license is declared. By default that means all rights are reserved: you can read it, but reusing or redistributing it is not clearly permitted. Ask the author before building on it commercially.
- Its trust signals score 88/100, with 1 caution from licensing, adoption, age or documentation. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
matlab-setup-gpu compared with similar skills
All 4 of these similar skills score higher than matlab-setup-gpu; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| matlab-setup-gpu (this skill)by matlab | 88 | 1.1k | 21d ago | SKILL.md |
| algorithmic-artby anthropics | 100 | 177.9k | 14d ago | SKILL.md |
| pptxby anthropics | 100 | 177.9k | 14d ago | SKILL.md |
| designby nextlevelbuilder | 100 | 133.6k | 3d ago | SKILL.md |
| ui-ux-pro-maxby nextlevelbuilder | 100 | 133.6k | 3d ago | SKILL.md |
Frequently asked questions
- How do I install matlab-setup-gpu?
- Run
npx skills add matlab/matlab-agentic-toolkit --skill matlab-setup-gpu. The install tabs above show the steps for each supported agent. - Which AI agents does matlab-setup-gpu work with?
- It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is matlab-setup-gpu safe to use?
- It declares no license and scores 88/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is matlab-setup-gpu still maintained?
- The repository was last updated 21 days ago, so matlab-setup-gpu is actively maintained.
Skill content
View source on GitHubname: matlab-setup-gpu description: > Detect and validate GPU availability for MATLAB GPU computing. Use when the user can't use their GPU, or is setting up or selecting a GPU. Triggers on: gpuDevice, GPU setup, check GPU, GPU not found, GPU not working, can't use GPU, GPU not available, unable to find a supported GPU device, compatible GPU, canUseGPU, validateGPU. license: https://www.mathworks.com/content/dam/mathworks/license/pmrl/license.md compatibility: ">=R2024b" metadata: author: MathWorks version: "1.0"
Set Up GPU for MATLAB
Detect whether a compatible GPU is available, validate it works, and diagnose common failure modes.
When to Use
- User wants to check if their system can run GPU code in MATLAB
- User gets errors when calling
gpuDeviceorgpuArray - User wants to set up or select a specific GPU in a multi-GPU system
- User needs to troubleshoot why GPU computing isn't working
- As a prerequisite check before any GPU-accelerated workflow
When NOT to Use
- Writing or optimizing GPU-accelerated code — this skill only detects and diagnoses GPU availability
- Monitoring GPU memory or utilization during computation — use
gpuDeviceproperties directly or NVIDIA tools - Distributing work across multiple GPUs with parallel pools — use
parpoolworkflows
Conventions
- Use MATLAB-native APIs (
canUseGPU,gpuDeviceTable,gpuDevice) for detection and properties — reservenvidia-smifor information MATLAB cannot provide - Prefer
canUseGPUovergpuDeviceCount == 0orisempty(gpuDeviceTable)for availability checks —canUseGPUalso verifies licensing and toolbox state - If recommending a driver update, fetch the GPU Computing Requirements documentation page for the user's MATLAB release to check the driver selection policy
Workflow
1. Is a GPU available?
canUseGPU
Returns true if PCT is installed, licensed, GPU support is present, and a device is available. If true, proceed to step 3 (list available devices).
2. If canUseGPU returns false — diagnose
validateGPU("all")
If the output contains "requires a newer graphics driver": this does not guarantee a newer driver exists. Do not state that the GPU is unsupported or end-of-life — direct the user to verify on the GPU Computing Requirements page for this MATLAB release before drawing any conclusion about hardware compatibility.
For all other failures, interpret using the Troubleshooting table.
3. List available devices
gpuDeviceTable % List all GPUs and indices (no memory allocation)
Always run gpuDeviceTable before selecting a device — it confirms which devices are visible and their MATLAB indices.
4. Select device and query properties
d = gpuDevice(N); % Select GPU N
properties(d) % List available device properties
5. Check driver model (Windows only)
d = gpuDevice; % returns device already selected
d.DriverModel
d.KernelExecutionTimeout
If WDDM: the GPU is shared with the display — long-running kernels may be killed by the OS watchdog, and the GPU may exhibit unstable behaviour when low on memory. If d.KernelExecutionTimeout is true, kernel timeouts are active.
TCC or MCDM avoid these issues but are only available on select professional and data centre GPUs not connected to a display. If switching is not an option, and user experiences kernel timeouts, advise: increase TDR timeout in Windows Registry, close other GPU-accelerated apps, or break computation into smaller chunks.
6. Benchmark GPU performance (optional)
To qualify the GPU's computing power, suggest the user run gpuBench (available from the MATLAB File Exchange, not shipped with MATLAB). It benchmarks memory bandwidth, single/double precision compute, compares GPU vs CPU performance, and provides comparison data against other popular GPUs.
Troubleshooting
| Symptom | Cause | Resolution |
|---------|-------|------------|
| canUseGPU returns false, no error | PCT not licensed | Check license('test','Distrib_Computing_Toolbox'). If false, user needs a PCT license. |
| validateGPU not found | PCT not installed or pre-R2024b | Check ver('parallel') — if empty, PCT is not installed; if version is below 24.2 (R2024b), validateGPU is not available in that release. |
| "requires a newer graphics driver" or validateGPU: platform or driver check FAILED | NVIDIA driver too old, or driver support for the GPU architecture may have ended | Does not guarantee a newer driver exists. Consult the GPU Computing Requirements documentation page for the user's release to confirm the GPU is still supported before advising a driver update. |
| validateGPU: "Device available" FAILED | Prohibited or exclusive compute mode | Check the message: if "prohibited" — vGPU graphics-only profile ("B" suffix, e.g. A16-2B), requires compute-enabled profile (Q or C suffix), advise user to escalate to system administrator. If "exclusive" — GPU in use by another process, free it or select a different device. |
| validateGPU: device count is 0 | Device not visible to MATLAB | If running in a container, verify GPU passthrough is configured. Otherwise, consult the GPU Computing Requirements documentation page for the user's release to confirm supported hardware. |
| GPU kernel killed mid-computation (Windows) | WDDM driver model with TDR active | See step 5 for driver model implications and remediation |
Key Functions
| Function | Purpose |
|----------|---------|
| canUseGPU | Quick availability check — true if PCT licensed and a usable GPU device exists |
| validateGPU | Structured diagnostic — tests each layer and reports results |
| gpuDeviceTable | List all visible GPUs with indices, names, and status (no memory allocation) |
| gpuDevice | Select a GPU by index, or return the current device (no argument) |
Copyright 2026 The MathWorks, Inc.
Related Skills
algorithmic-art
177.9kCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems.
pptx
177.9kUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an em…
design
133.6kComprehensive design skill: brand identity, design tokens, UI styling, logo generation (55 styles, Gemini, Atlas Cloud, or MuAPI AI), corporate identity program (50 deliverables, CIP mockups), HTML presentations (Chart.js), banner design (22 styles, social/ads/web/print), icon design (15 styles, SVG…
ui-ux-pro-max
133.6kUI/UX design intelligence for web, mobile, and desktop. This skill should be used when designing, building, reviewing, or fixing interfaces, including pages, components, design systems, accessibility, interaction, responsive layout, typography, color, charts, and stack-specific UI implementation.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
