Install any skill in seconds. Free to start, no credit card required.
Get Started Free →matlab/matlab-optimize-gpu-codegen
Optimize MATLAB design files for GPU Coder to generate faster CUDA code. Iteratively profiles, rewrites, and benchmarks until performance targets are met or diagnostics are resolved.
Passed 12 of 17 test cases with the skill, and 7 of 17 without it.
and 8 more in the full report
9 fixed7 passed either way4 still failing2 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 8 test cases the skill fixed. Same model, same prompt, with and without the skill.
When analyzing `ray_tracer.m`, the report showed `gpucoder:diagnostic:NoKernelFunPragma` for the main tracing calculation function. What code modification fixes this issue?
| Checked | Without skill | With skill |
|---|---|---|
| Adds coder.gpu.kernelfun to the named function. | Missed | Passed |
The instructions your model reads when the skill loads.
Iteratively optimize a MATLAB design file for GPU Coder: compile, benchmark, apply structural optimizations, profile with gpuPerformanceAnalyzer, fix diagnostics, and verify numerical equivalence at every step.
.m design file and representative inputscoder.gpuConfig("exe") — standalone executables cannot be benchmarked or
equivalence-checked from MATLAB. Suggest the user switch to mex or lib/dll and regenerate exe from the final optimized source.All codegen artifacts, profiling outputs, and optimized versions go in a
single temp directory for the entire session. pwd must be sessionDir for
every codegen/benchmark/PA call — otherwise compiled MEX and SIL binaries
land in the user's working directory.
Two helpers this skill calls — benchmarkMex and extractDiagnostics — live
in the scripts/ subfolder of this skill (the folder containing this
test cases passed, vs 7 / 17 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.