Skip to main content

compile_to_tenstorrent_racy_select

Function compile_to_tenstorrent_racy_select 

Source
pub fn compile_to_tenstorrent_racy_select(
    source: &str,
) -> Result<MeshLowering<RacySelectSpec>, String>
Expand description

Recognize a racy select (a task sleeps then sends; main awaits a receive-or-timeout) and lower it to a coordinator + task program. The coordinator compares the reported send virtual-time against the timeout — the VM’s deterministic scheduler rule — so the outcome is ≡VM on both branches, independent of real hardware timing.