一键导入
paracodex-serial-cuda-step1
ParaCodex prompt for serial to cuda step1 (implementation) step.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
ParaCodex prompt for serial to cuda step1 (implementation) 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-step1 |
| description | ParaCodex prompt for serial to cuda step1 (implementation) step. |
Directory: {kernel_dir}/
Files: {file_listing}
Reference: {kernel_dir}/analysis.md
Required:
# Baseline Serial output is in baseline_output.txt in {kernel_dir}/
MANDATORY: Create cuda_migration_plan.md in {kernel_dir} using template in references/output.md.
Reference: references/examples.md.
system_info_summary.txt; push to the largest short-run, memory-safe input that should load the GPU meaningfully on this device.cudaStreamCreate(&stream).cudaMallocAsync(&d_ptr, N * sizeof(T), stream) (CUDA 11.2+, stream-ordered, preferred) or cudaMalloc for static allocations.cudaMemcpyAsync(d_ptr, h_ptr, N * sizeof(T), cudaMemcpyHostToDevice, stream).__global__ kernel(s) for the identified hotspot.__launch_bounds__(BLOCK_SIZE) to cap register usage.dim3 grid((N + BLOCK_SIZE - 1) / BLOCK_SIZE).kernel<<<grid, block, 0, stream>>>(...args).cudaMemcpyAsync(h_out, d_out, ..., cudaMemcpyDeviceToHost, stream).cudaStreamSynchronize(stream).references/examples.md (Vector Add example).nvcc with -O3 --use_fast_math.<RUN_ARGS>, <PROGRAM_NAME>, <SOURCE_FILES>, etc.) with real values.cudaStreamDestroy(stream).{clean_cmd_str}
{build_cmd_str}
timeout 300 {run_cmd_str} > cuda_output.txt 2>&1
The deliverable must also support its plain run target or command with no ad hoc placeholder overrides. Do not rely on manual RUN_ARGS=... retries to pass step1.
diff baseline_output.txt cuda_output.txt
{nsys_profile_cmd} > {profile_log_path} 2>&1 produces GPU kernel information in the log.