Skip to content

Commit 416ed05

Browse files
MasterJH5574junrushao
authored andcommitted
[Web] Increase default EMCC compilation total memory size (apache#15218)
The default EMCC "total memory" is not large enough for end-to-end applications such as Web-LLM. This PR increases the limit to 40MB for compilation.
1 parent 64d5c78 commit 416ed05

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

python/tvm/contrib/emcc.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ def create_tvmjs_wasm(output, objects, options=None, cc="emcc"):
4646
cmd += ["-s", "ERROR_ON_UNDEFINED_SYMBOLS=0"]
4747
cmd += ["-s", "STANDALONE_WASM=1"]
4848
cmd += ["-s", "ALLOW_MEMORY_GROWTH=1"]
49+
cmd += ["-s", "TOTAL_MEMORY=40MB"]
4950

5051
objects = [objects] if isinstance(objects, str) else objects
5152

0 commit comments

Comments
 (0)