Compiler and linker flags for C++/CUDA solutions. Passed directly to the underlying build system (e.g. torch.utils.cpp_extension.load).
| 115 | |
| 116 | |
| 117 | class CompileOptions(BaseModelWithDocstrings): |
| 118 | """Compiler and linker flags for C++/CUDA solutions. |
| 119 | |
| 120 | Passed directly to the underlying build system (e.g. torch.utils.cpp_extension.load). |
| 121 | """ |
| 122 | |
| 123 | cflags: list[str] = Field(default_factory=list) |
| 124 | """Extra flags passed to the C++ compiler (gcc/g++).""" |
| 125 | cuda_cflags: list[str] = Field(default_factory=lambda: ["-O3", "--use_fast_math"]) |
| 126 | """Extra flags passed to the CUDA compiler (nvcc). Defaults to -O3 and --use_fast_math.""" |
| 127 | ld_flags: list[str] = Field(default_factory=lambda: ["-lcuda"]) |
| 128 | """Extra flags passed to the linker. Defaults to -lcuda.""" |
| 129 | |
| 130 | |
| 131 | class BuildSpec(BaseModelWithDocstrings): |
nothing calls this directly
no outgoing calls
no test coverage detected