kernelfoundry.compiler¶
Kernel compilation helpers for building PyTorch extensions.
See kernelfoundry.custom_test.Task.compile_torch_extension()
for a high-level interface.
Classes
|
Abstract base class for kernel compilers. |
|
Compiler class for SYCL programs using the Intel icpx compiler. |
|
Compiler class using the torch cpp_extension compiler. |
- class kernelfoundry.compiler.BaseKernelCompiler(extension_name: str, src: str, build_dir: str, gpu_arch: str, timeout: int = 120, verbose: bool = False)[source]¶
Abstract base class for kernel compilers.
- __init__(extension_name: str, src: str, build_dir: str, gpu_arch: str, timeout: int = 120, verbose: bool = False)[source]¶
Initialize the Compiler.
- Parameters:
extension_name (str) – Name of the PyTorch extension to build.
src (str) – Path to the source file.
build_dir (str) – Directory to store the compiled outputs.
gpu_arch (str) – GPU architecture string.
timeout (int) – Timeout for each compilation step in seconds.
verbose (bool) – Whether to enable verbose output.