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

Function test_mem_stats

imperative/python/test/unit/core/test_stream.py:26–32  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

24
25@pytest.mark.require_ngpu(1)
26def test_mem_stats():
27 memstat = MemStat("xpux:0", "xpux:1")
28
29 F.arange(1024, device="xpux:0")
30
31 mge._full_sync()
32 assert 4096 <= memstat.get_max("xpux:0") == memstat.get_max("xpux:1") <= 4096 + 128
33
34
35@pytest.mark.require_ngpu(1)

Callers

nothing calls this directly

Calls 2

get_maxMethod · 0.95
MemStatClass · 0.85

Tested by

no test coverage detected