run
Compile and execute CUDA or HIP programs on the CPU, returning exit code, output, and cuda4cpu diagnostics for barrier and copy issues.
Instructions
Compile and run a CUDA or HIP program on the CPU: its exit code, output, and the problems cuda4cpu reports (divergent barriers, copies in the wrong direction). Use check to look for bugs.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "run"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| args | No | The program's arguments | |
| files | No | Sources by file name (relative paths) and their contents: .cu or .hip files, .cpp host files, and headers they include | |
| paths | No | Existing source files to compile where they are | |
| stdin | No | Input for the program | |
| options | No | Compiler options, as nvcc's (-arch, -Xcompiler, -std, -I, -D, ...) or hipcc's; GPU options are accepted and ignored. Default -O2 -g. | |
| language | No | cuda (cuda4cpu-nvcc, the default) or hip (cuda4cpu-hipcc, the default when a source is a .hip file) | |
| environment | No | More environment variables for the program | |
| timeout_seconds | No | Time limit for each run (default 60, at most 600) | |
| working_directory | No | Where the program runs: by default, the directory of the last path given, or the directory of the inline files |