Interface IUnifiedKernelCompiler
- Namespace
- DotCompute.Abstractions
- Assembly
- DotCompute.Abstractions.dll
Non-generic version of the unified kernel compiler interface for convenience. Provides accelerator-specific compilation methods from legacy IKernelCompiler interface.
public interface IUnifiedKernelCompiler : IUnifiedKernelCompiler<KernelDefinition, ICompiledKernel>
- Inherited Members
Methods
BatchCompileAsync(IEnumerable<KernelDefinition>, IAccelerator, CancellationToken)
Performs batch compilation of multiple kernels for optimization. This method provides backward compatibility with legacy IKernelCompiler interface.
Task<IDictionary<string, ICompiledKernel>> BatchCompileAsync(IEnumerable<KernelDefinition> kernelDefinitions, IAccelerator accelerator, CancellationToken cancellationToken = default)
Parameters
kernelDefinitionsIEnumerable<KernelDefinition>The kernel definitions to compile
acceleratorIAcceleratorThe target accelerator
cancellationTokenCancellationTokenOptional cancellation token
Returns
- Task<IDictionary<string, ICompiledKernel>>
Dictionary mapping kernel names to compiled kernels
CanCompileAsync(KernelDefinition, IAccelerator)
Validates whether a kernel can be compiled for the specified accelerator. This method provides backward compatibility with legacy IKernelCompiler interface.
Task<bool> CanCompileAsync(KernelDefinition kernelDefinition, IAccelerator accelerator)
Parameters
kernelDefinitionKernelDefinitionThe kernel definition to validate
acceleratorIAcceleratorThe target accelerator
Returns
CompileAsync(KernelDefinition, IAccelerator, CancellationToken)
Compiles a kernel definition for the specified accelerator. This method provides backward compatibility with legacy IKernelCompiler interface.
Task<ICompiledKernel> CompileAsync(KernelDefinition kernelDefinition, IAccelerator accelerator, CancellationToken cancellationToken = default)
Parameters
kernelDefinitionKernelDefinitionThe kernel definition to compile
acceleratorIAcceleratorThe target accelerator
cancellationTokenCancellationTokenOptional cancellation token
Returns
- Task<ICompiledKernel>
The compiled kernel ready for execution
GetSupportedOptions(IAccelerator)
Gets the supported compilation options for the accelerator. This method provides backward compatibility with legacy IKernelCompiler interface.
CompilationOptions GetSupportedOptions(IAccelerator accelerator)
Parameters
acceleratorIAcceleratorThe target accelerator
Returns
- CompilationOptions
The supported compilation options