MCPcopy Create free account
hub / github.com/MrNeRF/LichtFeld-Studio / SetUp

Method SetUp

tests/test_vram_resize.cpp:33–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31class VRAMResizeTest : public ::testing::Test {
32protected:
33 void SetUp() override {
34 // Warm up allocator (slab init is lazy, ~288MB)
35 { auto _ = Tensor::empty({1}, Device::CUDA); }
36 forceMemoryCleanup();
37 auto [used, total] = getGPUMemoryMB();
38 baseline_vram_mb_ = used;
39 LOG_INFO("Baseline VRAM: {} MB / {} MB", used, total);
40 }
41
42 void TearDown() override {
43 forceMemoryCleanup();

Callers

nothing calls this directly

Calls 3

forceMemoryCleanupFunction · 0.85
getGPUMemoryMBFunction · 0.85
emptyFunction · 0.50

Tested by

no test coverage detected