solprop.calibration.first_use#
Calibrating automatically on first use (SEP 46 sections 5 and 6.10).
ensure() runs before the first native workspace: under
SOLPROP_CALIBRATION=auto, the default, an allocation with no row in its machine’s
profile first runs the quick calibration, after a
CalibrationNotice, once per process. for_workers()
calibrates a scan’s workers’ allocation at the standard level before they start,
unless a standard or thorough row already matches; a worker (ROLE) never
calibrates. Concurrent first runs on one host wait for the one that holds the
calibration claim, up to its deadline, then use its profile; an inconclusive
calibration publishes nothing and is retried after RETRY_SECONDS. What a
process that has already loaded the native extension then applies is in the manual,
docs/guide/performance/calibration.md (“The first run”).
Module Attributes
Set to |
|
How long |
Functions
|
Calibrate quickly before a first native workspace, if this allocation needs it. |
|
Calibrate a scan's workers' allocation at the standard level, if it needs it. |
- solprop.calibration.first_use.RETRY_SECONDS = 86400.0#
How long
autowaits after an inconclusive calibration before trying again.
- solprop.calibration.first_use.ROLE = 'SOLPROP_CALIBRATION_ROLE'#
Set to
workerin a scan’s workers, which never calibrate.
- solprop.calibration.first_use.ensure(environ=None)[source]#
Calibrate quickly before a first native workspace, if this allocation needs it.
A no-op unless
SOLPROP_CALIBRATION=auto, in a process that is not a scan’s worker, on a CPU build, with no row for its allocation, no inconclusive attempt in the last day and nobody else calibrating it; once per process. A process that has already loaded the native extension then refreshes its profile.- Parameters:
- environMapping[str, str] or None, optional
The environment; the process’s when
None.
- Returns:
- solprop.calibration.controller.CalibrationReport or None
The quick calibration’s report, or
Nonewhen none ran.
- solprop.calibration.first_use.for_workers(cpus, environ=None)[source]#
Calibrate a scan’s workers’ allocation at the standard level, if it needs it.
Run by the scan’s parent before its workers start, in children pinned like one worker; the other partitions stay idle meanwhile, so caches and memory bandwidth are less loaded than in the scan, which the row’s evidence records.
- Parameters:
- cpussequence of int
One worker’s CPUs.
- environMapping[str, str] or None, optional
The environment; the process’s when
None.
- Returns:
- solprop.calibration.controller.CalibrationReport or None
The report, or
Nonewhen a standard or thorough row already matches or nothing may be measured.