Stream: wasmtime

Topic: fuel determinism


view this post on Zulip Ashanti Mutinta (Apr 03 2024 at 17:14):

Weird question but how far does fuel determinism go? If use core_affinity and limit the number of instructions based on fuel, Would that be close to cpu instructions count?

view this post on Zulip Alex Crichton (Apr 03 2024 at 17:29):

Fuel should deterministically limit wasm execution beyond a certain point. You'll still have nondeterminism from host APIs or host interactions (e.g. memory.grow failing or not). Fuel is not an accurate measure of CPU instructions and for that you'll want to use CPU perf counters

view this post on Zulip Ashanti Mutinta (Apr 03 2024 at 17:54):

I see thank you! No api in wasmtime to facilitate this I'm guessing :thinking:

view this post on Zulip Lann Martin (Apr 03 2024 at 18:01):

Not directly, but see https://docs.rs/wasmtime/19.0.1/wasmtime/struct.Store.html#method.call_hook

view this post on Zulip Ashanti Mutinta (Apr 03 2024 at 18:07):

Amazing thank you


Last updated: Nov 22 2024 at 16:03 UTC