merlin.algorithms.module module
- class merlin.algorithms.module.MerlinModule
Bases:
ModuleBase Merlin module with shared execution-policy utilities.
- Parameters:
None –
Notes
Merlin remote execution policy:
_force_simulationdefaults toFalse. WhenTrue, the layer must run locally.force_localexposes that flag through a property interface.supports_offload()reports whether remote offload is possible viaexport_config().should_offload()returns whether the current module should be offloaded under the active policy.as_simulation()provides a context manager that temporarily forces local simulation.
- as_simulation()
Temporarily force local simulation within the context.
- static setup_device_and_dtype(device, dtype)
Normalize device/dtype to final forms.
- should_offload()
Return True if this layer should be offloaded under current policy.
- Return type: