MCPcopy Create free account
hub / github.com/Oneflow-Inc/oneflow / EmptyCache

Function EmptyCache

oneflow/api/python/env/env.h:69–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67inline Maybe<int32_t> GetFLAGS_v() { return FLAGS_v; }
68
69inline Maybe<void> EmptyCache() {
70 JUST(vm::CurrentRankSync());
71 auto* vm = JUST(SingletonMaybe<VirtualMachine>());
72 JUST(vm->ShrinkAllMem());
73 return Maybe<void>::Ok();
74}
75
76inline Maybe<void> SetGraphLRVerbose(bool verbose) {
77 SetGraphVerboseStepLr(verbose);

Callers

nothing calls this directly

Calls 2

CurrentRankSyncFunction · 0.85
ShrinkAllMemMethod · 0.80

Tested by

no test coverage detected