MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / get_workspace_limit

Function get_workspace_limit

imperative/src/impl/proxy_graph/mini_graph.h:90–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

88}
89
90static size_t get_workspace_limit(CompNode cn, size_t old_limit) {
91 size_t free = cn.get_free_mem();
92 size_t lmt = cn.get_max_block_size_available();
93 return std::max(lmt, free);
94}
95
96// single opr graph, for static inference and execution
97// contains static inference descs

Callers 3

run_testFunction · 0.85
TESTFunction · 0.85
setup_algoMethod · 0.85

Calls 3

maxFunction · 0.85
get_free_memMethod · 0.45

Tested by 2

run_testFunction · 0.68
TESTFunction · 0.68