chronon::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 |
| uint64_t | profiling_warmup_cycles |
| uint64_t | profiling_measurement_cycles |
| PartitionSolverType | partition_solver |
| size_t | num_threads |
| uint32_t | max_lookahead_cycles |
| uint64_t | epoch_size Cycles per epoch before sync. |
| bool | enable_weighted_partitioning |
| bool | enable_parallel |
| bool | enable_lookahead |
| bool | enable_dynamic_rebalance |
| bool | deterministic_partitioning |
| std::string | cost_profile_cache_path |
Detailed Description
struct chronon::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 |
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.05;
Skip rebalance if predicted gain below this fraction.
variable rebalance_imbalance_threshold
double rebalance_imbalance_threshold = 1.3;
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 = 8192;
variable profiling_warmup_cycles
uint64_t profiling_warmup_cycles = 512;
variable profiling_measurement_cycles
uint64_t profiling_measurement_cycles = 1024;
variable partition_solver
PartitionSolverType partition_solver = PartitionSolverType::Weighted;
variable num_threads
size_t num_threads = std::thread::hardware_concurrency();
variable max_lookahead_cycles
uint32_t max_lookahead_cycles = 100;
variable epoch_size
uint64_t epoch_size = 64;
Cycles per epoch before sync.
variable enable_weighted_partitioning
bool enable_weighted_partitioning = true;
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_dynamic_rebalance
bool enable_dynamic_rebalance = true;
variable deterministic_partitioning
bool deterministic_partitioning = false;
Skip live wall-clock profiling and partition units with constant unit_cost=1.0 + sync_cost=100ns. The partitioner's LPT becomes a pure round-robin and the resulting cluster_to_thread mapping is bit-exactly reproducible run-to-run (and often across num_workers for cost-insensitive topologies). Use for regression tests and A/B comparisons; leave off for production throughput.
variable cost_profile_cache_path
std::string cost_profile_cache_path;
When non-empty, serialize the TickCostProfiler output here after the first profiling run and reuse it on subsequent runs whose topology hash matches. Cache hits skip the rdtsc profiler, removing measurement noise from run-to-run partitioning.
Updated on 2026-05-26 at 05:42:32 +0000