sailfish.kernel.system.execution_context

sailfish.kernel.system.execution_context(mode, device_id=None)[source]

Return a context manager appropriate for the given exuction mode.

If mode is “gpu”, then a specific device id may be provided to specify the GPU onto which kernel launches should be spawned.