solprop.backends.sessions#
Which run session serves a loaded backend (SEP 47 phase 2).
The NumPy reference runs in its own session
(solprop.backends.host.session.HostSession, over
solprop.backends.host.driver.HostDriver); every other backend – the native
bridge, until its own session replaces it in phase 3 – runs in the transitional
session over the inherited driver
(solprop.backends.driver_session.DriverSession). start_session() chooses
by the driver’s type, so the run layer has one door. start_group() is the door
for a group of compatible members (SEP 47 section 6.7), served on every backend by the
transitional group over the lockstep runners
(solprop.backends.driver_session.DriverGroupSession).
Functions
|
Start the group that advances compatible members through one fixed schedule. |
|
Start the session that serves backend for one run. |
- solprop.backends.sessions.start_group(members, problems, requests, starts, *, stop=None)[source]#
Start the group that advances compatible members through one fixed schedule.
- Parameters:
- memberscollections.abc.Sequence of solprop.backends.protocol.Backend
One constructed backend per member, all of one backend; the group owns them once constructed.
- problemscollections.abc.Sequence of solprop.translate.problem.PropagationProblem
Each member’s independently translated problem.
- requestscollections.abc.Sequence of solprop.translate.run_request.RunRequest
Each member’s run request, with its own fresh boundary monitor.
- startscollections.abc.Sequence of solprop.backends.session.Start
Each member’s entrance.
- stopsolprop.log.StopFlag or None, optional
A group-wide stop token.
- Returns:
- solprop.backends.driver_session.DriverGroupSession
The started group (
GroupSession).
- solprop.backends.sessions.start_session(backend, problem, request, start, *, listener=None, started=None, stop=None, owns=True)[source]#
Start the session that serves backend for one run.
- Parameters:
- backendsolprop.backends.protocol.Backend
The backend, constructed for problem. A backend reused from an earlier run is loaded again from start, which restores everything a march reads.
- problemsolprop.translate.problem.PropagationProblem
The translated problem.
- requestsolprop.translate.run_request.RunRequest
The run’s policies.
- startsolprop.backends.session.Start
Where the run starts; the session takes its field.
- listenercallable or None, optional
Called with each attempt as it is made, for a progress reporter.
- startedcallable or None, optional
Called with the start, the end and the plane count when propagation begins.
- stopsolprop.log.StopFlag or None, optional
The run’s stop token.
- ownsbool, optional
Whether closing the session closes the backend.
- Returns:
- solprop.backends.driver_session.DriverSession
A
HostSessionfor a reference backend, or the transitional session for any other.