一键导入
paracodex-serial-cuda-step2
ParaCodex prompt for serial to cuda step2 (optimization) step.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
ParaCodex prompt for serial to cuda step2 (optimization) step.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
ParaCodex baseline skill: translate serial / parallel code to GPU-offloaded target API, optimize, compile, and run — all in a single session.
ParaCodex prompt for cuda to hip analysis step.
ParaCodex prompt for cuda to hip step1 (implementation) step.
ParaCodex prompt for cuda to hip step2 (optimization) step.
ParaCodex prompt for cuda ocl analysis step.
ParaCodex prompt for cuda ocl step1 step.
| name | paracodex-serial-cuda-step2 |
| description | ParaCodex prompt for serial to cuda step2 (optimization) step. |
Directory: {kernel_dir}/
Files: {file_listing}
Profile: {profile_log_path}
Reference: {kernel_dir}/cuda_migration_plan.md
Migrated from Serial → CUDA. Correct but likely slow (naive port).
cd {kernel_dir}
{clean_cmd_str}
timeout 300 {correctness_run_cmd} > current_output.txt 2>&1
diff baseline_output.txt current_output.txt
nvprof).system_info_summary.txt to size that run against the actual device. Prefer the largest short-run, memory-safe input that should load the GPU meaningfully, not merely a modest increase over the default.MANDATORY: Create optimization_plan.md in {kernel_dir} using template in references/output.md.
Fill Analysis:
Reference: references/examples.md.
cudaOccupancyMaxPotentialBlockSize to find optimal block size; annotate kernels with __launch_bounds__(BLOCK_SIZE).cudaMemcpyAsync + streams to overlap transfers with compute.__shfl_down_sync(0xffffffff, val, offset) for warp-level reductions. Preferred modern alternative: cg::reduce(warp, val, cg::plus<float>()) from cooperative_groups.h.--use_fast_math (or __sinf, __cosf, __expf intrinsics) where precision allows.cudaStreamBeginCapture / cudaGraphInstantiate / cudaGraphLaunch to eliminate per-launch overhead.{clean_cmd_str}
{build_cmd_str}
timeout 300 {run_cmd_str} > optimized_output.txt 2>&1
diff baseline_output.txt optimized_output.txt
{profile_cmd_str} > {profile_log_path}_optimized 2>&1