compile
Build CUDA or HIP sources as nvcc or hipcc would, returning success or failure, source-line diagnostics, and cuda4cpu features the sources use but do not support.
Instructions
Compile CUDA or HIP sources with cuda4cpu, as nvcc or hipcc would: whether they build, the compiler's diagnostics at the sources' own lines, and the features the sources use that cuda4cpu does not implement (textures, inline PTX, CUDA libraries, ...).
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": "compile"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| 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 | |
| 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) |