chronon::sender::TickSimulationConfig
#include <TickSimulationConfig.hpp>
Public Types
| Name | |
|---|---|
| enum class | PartitionSolverType { Weighted, SA} |
Public Attributes
| Name | |
|---|---|
| bool | trace_execution |
| SchedulerTimelineTraceConfig | timeline_trace |
| uint64_t | tick_frequency_hz 1 GHz default. |
| double | sa_critical_path_weight |
| double | rebalance_min_gain Skip rebalance if predicted gain below this fraction. |
| double | rebalance_imbalance_threshold |
| uint64_t | rebalance_cooldown_cycles Minimum cycles between rebalances (0 disables cooldown). |
| uint64_t | rebalance_check_interval_cycles |
| PartitionSolverType | partition_solver |
| size_t | num_threads |
| uint32_t | max_lookahead_cycles |
| double | initial_partition_sync_cost_ns |
| uint64_t | epoch_size |
| bool | enable_weighted_partitioning |
| bool | enable_parallel |
| bool | enable_lookahead |
| bool | enable_epoch_free_lookahead |
| bool | enable_dynamic_rebalance |
Detailed Description
struct chronon::sender::TickSimulationConfig;
Configuration for tick-based simulation.
Placement (initialization-time) vs. scheduling (runtime) are orthogonal. Placement groups units into clusters; scheduling decides how those clusters advance in time. cluster.size() == 1 is the fallback for un-clustered topologies — the scheduler treats the two uniformly.
Public Types Documentation
enum PartitionSolverType
| Enumerator | Value | Description |
|---|---|---|
| Weighted | ||
| SA |
Initial partition solver used by the cluster-aware path. SA is the default; Weighted keeps the deterministic four-phase solver available.
Public Attributes Documentation
variable trace_execution
bool trace_execution = false;
variable timeline_trace
SchedulerTimelineTraceConfig timeline_trace;
variable tick_frequency_hz
uint64_t tick_frequency_hz = 1'000'000'000;
1 GHz default.
variable sa_critical_path_weight
double sa_critical_path_weight = 0.0;
SA objective critical-path term weight applied to max per-thread chain cost (ns). 0 disables the term (default).
variable rebalance_min_gain
double rebalance_min_gain = 0.01;
Skip rebalance if predicted gain below this fraction.
variable rebalance_imbalance_threshold
double rebalance_imbalance_threshold = 1.03;
variable rebalance_cooldown_cycles
uint64_t rebalance_cooldown_cycles =
0;
Minimum cycles between rebalances (0 disables cooldown).
variable rebalance_check_interval_cycles
uint64_t rebalance_check_interval_cycles = 2048;
variable partition_solver
PartitionSolverType partition_solver = PartitionSolverType::SA;
variable num_threads
size_t num_threads = std::thread::hardware_concurrency();
variable max_lookahead_cycles
uint32_t max_lookahead_cycles = 100;
variable initial_partition_sync_cost_ns
double initial_partition_sync_cost_ns = 8.0;
Fixed, wall-clock-free sync cost (ns) fed ONLY to the initial deterministic partition so the solver minimizes cross-thread edge cut, co-locating topologically-connected units (e.g. a CPU core's pipeline) on one thread. Scaled to dominate the uniform unit cost (1.0) — empirically ~8x is the sweet spot: large enough to pull connected components together, small enough that the compute-balance signal still steers the SA solver (much higher swamps it and convergence degrades). 0 restores the old pure-load-balance behavior.
This knob is scoped to the initial partition: it is not written into platform_metrics_, so dynamic rebalance decides migrations on its own inputs (measured unit costs + platform_metrics_) and is unaffected by it.
variable epoch_size
uint64_t epoch_size = 64;
Deprecated compatibility knob for the per-epoch lookahead fallback. Epoch-free lookahead ignores this value; it will be removed or ignored once the fallback scheduler is removed.
variable enable_weighted_partitioning
bool enable_weighted_partitioning = true;
Enables the cluster-aware partitioning path. When false, Chronon falls back to the legacy topology-only thread assignment.
variable enable_parallel
bool enable_parallel = true;
Scheduler selection:
- !enable_parallel → Sequential (single-thread)
- enable_parallel && !enable_lookahead → Barrier (per-cycle sync)
- enable_parallel && enable_lookahead → Lookahead (per-cluster atomics)
variable enable_lookahead
bool enable_lookahead = true;
variable enable_epoch_free_lookahead
bool enable_epoch_free_lookahead = true;
Epoch-free lookahead: in the persistent-worker lookahead path, collapse the per-epoch std::barrier into a single run-spanning window. Run-ahead is then bounded by lookahead_floor_ + max_lookahead_cycles plus per-edge queue-headroom dependencies, with per-connection MPSC arbitration and a single MPSC flush at run end. Engaged by runParallel() only when the persistent path is eligible, max_lookahead_cycles is positive, and every MPSC port has fully resolved per-connection progress; otherwise it falls back to the barrier path. Results are identical to the barrier path — it trades per-epoch straggler idle for lookahead-window slack.
Setting this to false selects the deprecated per-epoch lookahead fallback. That fallback is retained for compatibility and will be removed in a future release.
variable enable_dynamic_rebalance
bool enable_dynamic_rebalance = true;
Updated on 2026-07-06 at 09:03:33 +0000