Skip to content

Commit 24f796f

Browse files
Merge pull request #539 from fastly/dgohman-fastly/relaxed-simd-deterministic
Enable relaxed-simd-deterministic for Viceroy.
2 parents f462469 + d03fb04 commit 24f796f

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/execute.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1042,6 +1042,15 @@ fn configure_wasmtime(
10421042
config.wasm_component_model(true);
10431043
}
10441044

1045+
// Wasm permits the "relaxed" instructions to be nondeterministic
1046+
// between runs, but requires them to be deterministic within runs.
1047+
// Snapshotting a program's execution to avoid redundantly running
1048+
// initialization code on each request is an important optimization,
1049+
// so we enable deterministic lowerings for relaxed SIMD to ensure
1050+
// that it works consistently even if the initialization runs on a
1051+
// different host architecture.
1052+
config.relaxed_simd_deterministic(true);
1053+
10451054
config
10461055
}
10471056

0 commit comments

Comments
 (0)