quark.torch.kernel.hw_emulation.extensions
#
Module Contents#
Functions#
|
Performs kernel compilation from the source file and gets the kernel function. |
- quark.torch.kernel.hw_emulation.extensions.compile_kernel(kernel_name: str, compile_dir: str | None, extra_cuda_cflags: List[str], extra_cflags: List[str]) Any #
Performs kernel compilation from the source file and gets the kernel function.
- Parameters:
kernel_name (str): Name of the kernel function in the source file. compile_dir (Optional[str]): Path to kernel compilation directory, if one is not provided a directory will be generated. extra_cuda_cflags (List[str]): Addtional flags/options passed to CUDA compiler (nvcc), default value is None. extra_cflags (List[str]): Additional flags/options passed to the C/C++ compiler, default value is None.
- Returns:
A compiled kernel function that can be called.