with one click
paracodex-supervisor
ParaCodex prompt for supervisor step.
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
ParaCodex prompt for supervisor step.
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
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-supervisor |
| description | ParaCodex prompt for supervisor step. |
Goal: Your sole purpose is to ensure the candidate code at {kernel_dir} (file(s): {file_list_str}) is algorithmically (e.g. can be different algorithms, but must have identical result) identical to the golden reference at {golden_file_str}. You will achieve this by instrumenting both with gate.h macros and fixing any discrepancies in the candidate code.
MANDATORY: You must not fallback to CPU implementation. The code must run on the GPU. If correctness cannot be achieved explain why in details.
You must {instructions_context}
Context:
{kernel_dir}.
{backup_msg}{abs_gate_sdk}/gate.h.{golden_file_str} includes #include "gate.h".GATE_CHECKSUM_* or GATE_STATS_* macros to the golden file to capture only the designated final result buffers from the correctness contract. This is your "source of truth". You should only need to do this once.{kernel_dir} include #include "gate.h":
{file_listing}n for stats) must match perfectly.make -f Makefile.nvc check-correctness and disabled for normal builds/runs.{golden_file_str}).{kernel_dir} directory, run the following commands in order:
{clean_cmd}make -f Makefile.nvc check-correctness > supervisor_output.txt 2>&1supervisor_output.txt in {kernel_dir}/ for inspection.correctness_verification.md in {kernel_dir} (see template below), then stop.supervisor_output.txt to identify the compiler error.
b. If the error is a missing header/include path or missing source file, fix the Makefile (Makefile.nvc) minimally to resolve it.
c. If the error is in the source code (e.g., syntax from GATE macros), fix the source.
d. Loop back to Step 3.supervisor_output.txt to analyze the failure output from the GATE check.
b. Make the absolute minimum change to the relevant file(s) to fix the numerical error.
c. Prefer fixes that preserve kernel shape, offload granularity, and end-to-end runtime.
d. Loop back to Step 3 (Build and Run Check). Do not stop until the check passes.{clean_cmd} in {kernel_dir}.check-correctness (e.g., missing include path for gate.h, wrong source file list, missing -I flag, wrong reference code path, or missing -D flag for the guard on the correctness target). If the build fails and the only fix is a Makefile change, you may edit the Makefile minimally to fix the compilation error. Allowed: adding -I paths, fixing source file lists, adding -lgatelib or similar link flags, adding a verification-only -D... define to the correctness target. Forbidden: changing compiler, optimization flags (-O), or target architecture.{golden_file_str}) except to add gate.h and GATE macros.{kernel_dir}:
{file_listing}
{strict_rules_extra}
Never / Forbiddensupervisor_output.txt - Raw output of make -f Makefile.nvc check-correctnesscorrectness_verification.md - Human-readable summary written when the check passes (see template)correctness_verification.md template:
# Correctness Verification
**Kernel:** {kernel_dir}
**Candidate files:** {file_list_str}
**Golden reference:** {golden_file_str}
**Status:** PASS
## GATE Checks
| Metric | Golden | Candidate | Match |
|--------|--------|-----------|-------|
| <metric name> | <value> | <value> | ✓ |
## Fixes Applied
<!-- List any changes made to candidate code to achieve correctness, or "None" if it passed immediately -->
- <description of fix, or "None">
## Makefile Changes
<!-- List any Makefile edits required for compilation, or "None" -->
- <description, or "None">
Deliverable:
{kernel_dir} that passes make -f Makefile.nvc check-correctness:
{file_listing}supervisor_output.txt — raw check outputcorrectness_verification.md — verification summary