diff --git a/src/generator/prompts/GeneratorSystemPrompt.md b/src/generator/prompts/GeneratorSystemPrompt.md index 5aa59091..c006d9b5 100644 --- a/src/generator/prompts/GeneratorSystemPrompt.md +++ b/src/generator/prompts/GeneratorSystemPrompt.md @@ -24,6 +24,8 @@ Your job is to generate a **single compilable CUDA PyTorch extension source file 4. No text, explanation, or comments outside the code block. +5. Do NOT delegate the target operation to ANY wrapper; implement the computation directly in the kernel. + ----------------------------------------------- EXAMPLE CODE STRUCTURE ----------------------------------------------- diff --git a/src/generator/prompts/TritonGeneratorSystemPrompt.md b/src/generator/prompts/TritonGeneratorSystemPrompt.md index f8f686f9..f1fec8b8 100644 --- a/src/generator/prompts/TritonGeneratorSystemPrompt.md +++ b/src/generator/prompts/TritonGeneratorSystemPrompt.md @@ -25,6 +25,8 @@ Your job is to generate a **single valid OpenAI Triton kernel file** named `kern 4. No text, explanation, or comments outside the code block. +5. Do NOT delegate the target operation to ANY wrapper; implement the computation directly in the kernel. + ----------------------------------------------- EXAMPLE CODE STRUCTURE ----------------------------------------------- diff --git a/src/optimizer/backends/cuda/prompts.py b/src/optimizer/backends/cuda/prompts.py index b9326eea..6acf57ef 100644 --- a/src/optimizer/backends/cuda/prompts.py +++ b/src/optimizer/backends/cuda/prompts.py @@ -42,6 +42,7 @@ def get_sys_prompt() -> str: 3. **Preserve the exact function signature** of `launch()` - parameter order and types must NOT change HOWEVER if in the initial user request includes the parameters, may hard code or optimize for the given parameters 4. The optimized code must be a drop-in replacement for the current kernel 5. Do NOT put optimization comments inside the kernel code itself — all reasoning goes in the FEEDBACK block +6. Do NOT delegate the target operation to ANY wrapper; implement the computation directly in the kernel. ----------------------------------------------------------------------------------------------- STARTING IDEAS FOR OPTIMIZATION STRATEGIES TO CONSIDER (but also be creative AND MAKE YOUR OWN diff --git a/src/optimizer/backends/triton/prompts.py b/src/optimizer/backends/triton/prompts.py index ed0e104a..9255572c 100644 --- a/src/optimizer/backends/triton/prompts.py +++ b/src/optimizer/backends/triton/prompts.py @@ -46,6 +46,7 @@ def get_sys_prompt() -> str: 3. **Preserve the exact function signature** of `launch()` - parameter order and types must NOT change 4. The optimized code must be a drop-in replacement for the current kernel 5. Include a brief comment at the top explaining your optimization strategy (2-3 lines max) +6. Do NOT delegate the target operation to ANY wrapper; implement the computation directly in the kernel. ----------------------------------------------- TRITON PROGRAMMING MODEL