fitzgen requested wasmtime-core-reviewers for a review on PR #6789.
fitzgen opened PR #6789 from fitzgen:resources-required
to bytecodealliance:main
:
Returns a summary of the resources required to instantiate this module or component.
Potential uses of the returned information:
Determining whether your pooling allocator configuration supports instantiating this module.
Deciding how many of which
Module
you want to instantiate within a fixed amount of resources, e.g. determining whether to create 5 instances of module X or 10 instances of module Y.Part of #6627.
<!--
Please make sure you include the following information:
If this work has been discussed elsewhere, please include a link to that
conversation. If it was discussed in an issue, just mention "issue #...".Explain why this change is needed. If the details are in an issue already,
this can be brief.Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.htmlPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
fitzgen requested pchickey for a review on PR #6789.
pchickey submitted PR review.
pchickey submitted PR review.
pchickey created PR review comment:
I expect that this means, for all components using the wasi-preview1-component-adapter (which, for now, is approximately all "real world" components), we won't be able to use this estimator. How much effort would it be to detect and handle the simplest cases of modules importing a memory?
fitzgen submitted PR review.
fitzgen created PR review comment:
If the adapter is still part of this component graph, then everything should be fine and this method will work today as-is.
If the adapter is a module that the component graph imports from the host, then there really isn't much we can do here. An imported module could define zero or five memories, we have no way of telling how many it will need without actually having the module.
pchickey created PR review comment:
got it! thanks. I misunderstood the way in which
Import
was being used here.
pchickey submitted PR review.
pchickey edited PR review comment.
pchickey edited PR review comment.
fitzgen submitted PR review.
fitzgen created PR review comment:
Ah, yeah this is after the component graph has been collapsed/inlined into a single thing, so imports at this layer are imports into the component graph, not between modules within the same component graph.
fitzgen updated PR #6789.
fitzgen has enabled auto merge for PR #6789.
fitzgen merged PR #6789.
Last updated: Dec 23 2024 at 12:05 UTC