con un clic
paracodex-cuda-ocl-step2
ParaCodex prompt for cuda ocl step2 step.
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Menú
ParaCodex prompt for cuda ocl step2 step.
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Basado en la clasificación ocupacional 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-cuda-ocl-step2 |
| description | ParaCodex prompt for cuda ocl step2 step. |
Directory: {kernel_dir}/
Files: {file_listing}
Profile: {profile_log_path}
Reference: {kernel_dir}/opencl_migration_plan.md
Migrated from CUDA → OpenCL. Differences in runtime, compiler, and memory handling often cause performance gaps.
cd {kernel_dir}
{clean_cmd_str}
timeout 300 {correctness_run_cmd} > current_output.txt 2>&1
diff baseline_output.txt current_output.txt
If errors, fix correctness issues before optimization.
cat {profile_log_path} | grep ...).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.
Reference: references/examples.md (Bottleneck Analysis).
Analyses to check:
Reference: references/examples.md (Optimization Examples).
CL_KERNEL_PREFERRED_WORK_GROUP_SIZE_MULTIPLE and set local_work_size to a multiple of it.native_sin, native_cos, native_sqrt where precision allows (avoids IEEE-754 overhead).CL_MEM_ALLOC_HOST_PTR (pinned) buffers; use clEnqueueWriteBuffer with CL_FALSE (non-blocking) + events for async.CLK_LOCAL_MEM_FENCE over CLK_GLOBAL_MEM_FENCE when only local memory requires synchronization.float4/int4 types for memory reads/writes to improve coalescing and instruction throughput.restrict, private variable caching of repeated global reads, #pragma unroll.{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
Update optimization_plan.md using "Final Performance Summary" template, including whether larger-input profiling changed the decision.