Class MetalBackendPlugin
- Namespace
- DotCompute.Backends.Metal.Registration
- Assembly
- DotCompute.Backends.Metal.dll
Plugin implementation for the Metal backend. Consolidates duplicate registration patterns using BaseBackendPlugin.
public sealed class MetalBackendPlugin : BaseBackendPlugin<MetalAccelerator, MetalAcceleratorOptions>, IBackendPlugin, IDisposable
- Inheritance
-
MetalBackendPlugin
- Implements
- Inherited Members
- Extension Methods
Properties
AcceleratorName
Gets the name used for the named accelerator wrapper. Override this to customize the accelerator name.
protected override string AcceleratorName { get; }
Property Value
Author
Gets the author of the plugin.
public override string Author { get; }
Property Value
Capabilities
Gets the plugin's capabilities and features.
public override PluginCapabilities Capabilities { get; }
Property Value
ConfigurationSectionName
Gets the configuration section name for backend options. Override this to customize the configuration section path.
protected override string ConfigurationSectionName { get; }
Property Value
Description
Gets the description of the plugin.
public override string Description { get; }
Property Value
Id
Gets the unique identifier for this plugin.
public override string Id { get; }
Property Value
Name
Gets the display name of the plugin.
public override string Name { get; }
Property Value
Version
Gets the version of the plugin.
public override Version Version { get; }
Property Value
Methods
ConfigureBackendOptions(IServiceCollection, IConfiguration)
Configures backend-specific options. Override this method to provide custom configuration binding logic.
[UnconditionalSuppressMessage("AOT", "IL2026:Members annotated with 'RequiresUnreferencedCodeAttribute' require dynamic access otherwise can break functionality when trimming application code", Justification = "Configuration options are preserved")]
[UnconditionalSuppressMessage("AOT", "IL3050:Calling members annotated with 'RequiresDynamicCodeAttribute' may break functionality when AOT compiling.", Justification = "Configuration options are preserved")]
protected override void ConfigureBackendOptions(IServiceCollection services, IConfiguration configuration)
Parameters
servicesIServiceCollectionThe service collection.
configurationIConfigurationThe configuration instance.
GetConfigurationSchema()
Gets the plugin's configuration schema.
public override string GetConfigurationSchema()
Returns
- string
JSON schema for the plugin's configuration.
OnUpdateMetrics(PluginMetrics)
Called when metrics need to be updated.
protected override void OnUpdateMetrics(PluginMetrics metrics)
Parameters
metricsPluginMetrics
OnValidate(PluginValidationResult)
Called when plugin validation is performed.
protected override void OnValidate(PluginValidationResult result)
Parameters
resultPluginValidationResult
RegisterAccelerator(IServiceCollection, IConfiguration)
Registers the backend-specific accelerator. This method must be implemented by derived classes to provide their specific accelerator registration logic.
protected override void RegisterAccelerator(IServiceCollection services, IConfiguration configuration)
Parameters
servicesIServiceCollectionThe service collection.
configurationIConfigurationThe configuration instance.