MakotoUwu commented on code in PR #19771:
URL: https://github.com/apache/tvm/pull/19771#discussion_r3580831791
##########
web/src/runtime.ts:
##########
@@ -1323,6 +1323,16 @@ export class Instance implements Disposable {
artifactCache: ArtifactCacheTemplate,
signal?: AbortSignal,
) {
+ const maxChunkBytes = 128 * 1024 * 1024;
Review Comment:
I reran the historical 1120 MiB CPU reproducer with the same artifact and
host:
```text
32 MiB pass, 36 chunks
64 MiB pass, 18 chunks
128 MiB pass, 9 chunks
256 MiB pass, 5 chunks
512 MiB fail
1024 MiB fail
```
`CachedCallStack` grows geometrically and retains its backing allocation. At
512 and 1024 MiB, that growth drives the next Wasm allocation close to 1 GiB.
The 128 MiB default stays below the largest passing value to leave headroom
for
the final tensor, retained staging memory, call metadata, and other Wasm
allocations.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]