بنقرة واحدة
paracodex-ocl-cuda-step1
ParaCodex prompt for ocl cuda step1 step.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
ParaCodex prompt for ocl cuda step1 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-ocl-cuda-step1 |
| description | ParaCodex prompt for ocl cuda step1 step. |
Directory: {kernel_dir}/
Files: {file_listing}
Reference: {kernel_dir}/analysis.md
Required:
# Baseline OpenCL 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 (Indexing, Dynamic Shared, etc.).
Fill plan from analysis.md:
system_info_summary.txt; prefer the largest short-run, memory-safe input that should load the GPU meaningfully on this device, not merely a token size increase.__kernel → __global__, __local → __shared__.get_global_id → blockIdx*blockDim + threadIdx).barrier() and atomic_add.references/examples.md (Indexing & Dynamic Shared).cudaStream_t stream;
cudaStreamCreate(&stream);
clCreateBuffer/clEnqueueWriteBuffer with cudaMalloc + cudaMemcpyAsync(..., stream).clEnqueueNDRangeKernel → kernel<<<grid, block, 0, stream>>>.cudaMemcpyAsync(h_out, d_out, ..., cudaMemcpyDeviceToHost, stream).cudaStreamSynchronize(stream) and destroy with cudaStreamDestroy(stream).(N + 255) / 256.references/examples.md (Launch Mapping & Error Handling).references/output.md checklist.CUDA_CHECK macros.<RUN_ARGS>, <PROGRAM_NAME>, <SOURCE_FILES>, etc.) with real values.{clean_cmd_str}
{build_cmd_str}
timeout 300 {run_cmd_str} > cuda_output.txt 2>&1
Debug Issues:
diff baseline_output.txt cuda_output.txt
{clean_cmd_str}
{profile_cmd_str} > {profile_log_path} 2>&1
{nsys_profile_cmd} > {profile_log_path} 2>&1 produces GPU kernel information in the log.