From 49576d2f10052cea6dee37c88f9d77c9c0b271ad Mon Sep 17 00:00:00 2001 From: Ruihang Lai Date: Mon, 3 Jul 2023 19:23:46 -0400 Subject: [PATCH] [Web] Increase default EMCC compilation total memory size 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. --- python/tvm/contrib/emcc.py | 1 + 1 file changed, 1 insertion(+) diff --git a/python/tvm/contrib/emcc.py b/python/tvm/contrib/emcc.py index 8be48651262f..294b9a80cfbc 100644 --- a/python/tvm/contrib/emcc.py +++ b/python/tvm/contrib/emcc.py @@ -46,6 +46,7 @@ def create_tvmjs_wasm(output, objects, options=None, cc="emcc"): cmd += ["-s", "ERROR_ON_UNDEFINED_SYMBOLS=0"] cmd += ["-s", "STANDALONE_WASM=1"] cmd += ["-s", "ALLOW_MEMORY_GROWTH=1"] + cmd += ["-s", "TOTAL_MEMORY=40MB"] objects = [objects] if isinstance(objects, str) else objects