[uTVM][Runtime] Introduce Virtual Memory Allocator to CRT (#5124)
authorLiangfu Chen <liangfu.chen@icloud.com>
Tue, 7 Apr 2020 21:33:05 +0000 (05:33 +0800)
committerGitHub <noreply@github.com>
Tue, 7 Apr 2020 21:33:05 +0000 (14:33 -0700)
commite11a6092e629cadd34af1f48be47817ca9c65fd4
treee965a7887571c679907954e07b2ee901bba22d9d
parentf5b02fdb1b5a7b6be79df97035ec1c3b80e3c665
[uTVM][Runtime] Introduce Virtual Memory Allocator to CRT (#5124)

* initial crt_memory and memory leak fix in graph_runtime

Change-Id: I0f79f909a04d1c677aabb80f202f0612c5ce7f2a

* fix memory leak

Change-Id: I37104c09e28112b1974fa2b064c809d0a8d686c3

* clean up

Change-Id: I039b12015a1d56c8f4120867cd5a5292da34f3e3

* implement vrealloc

Change-Id: I35800470bcbfcf96652494f359711cb4c2d34398

* allocate from stack memory for most of the variables

Change-Id: I72071289843fff4031c0df8796868a0b9fbc57ee

* allocate from stack memory for all of the variables

Change-Id: I32dba85ac1660c77f51c2d0d8ab6436ed0c01c74

* lint

Change-Id: If12cd240685d7791fc60bc0cfb66389cdc186b73

* lint

Change-Id: I7c9d90c11b60b8edda2427ebd189ebe535af2100

* facilitate the growth of TVM_CRT_MAX_NDIM

Change-Id: I939fa43027a5c7529c5c7c6bd8d6e6beb91b7581

* extend test coverage of vmalloc

Change-Id: Ie4ff6b64fdfe6810836cf8fd44dace82a20c4581

* lint

Change-Id: Ibf3c06619ef296df5c49f3945cb6428777781d69

* move logging.h to src

* fix an error in macOS

* remove logging.h

* use cflags for gcc

* fix compilation error
15 files changed:
apps/bundle_deploy/Makefile
apps/bundle_deploy/demo.cc
apps/bundle_deploy/runtime.c
apps/bundle_deploy/test.cc
include/tvm/runtime/crt/memory.h [new file with mode: 0644]
src/runtime/crt/crt_backend_api.c
src/runtime/crt/graph_runtime.c
src/runtime/crt/graph_runtime.h
src/runtime/crt/load_json.c
src/runtime/crt/logging.h [new file with mode: 0644]
src/runtime/crt/memory.c [new file with mode: 0644]
src/runtime/crt/module.h
src/runtime/crt/ndarray.c
src/runtime/crt/packed_func.h
tests/cpp/crt_memory_test.cc [new file with mode: 0644]