MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / TEST

Function TEST

tensorflow/core/common_runtime/gpu_tensorpool_allocator_test.cc:35–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33namespace {
34
35TEST(GPUTensorPoolAllocatorTest, SmallAllocationWithAlignment32B) {
36 PlatformGpuId platform_gpu_id(0);
37 GPUMemAllocator* sub_allocator = new GPUMemAllocator(
38 GpuIdUtil::ExecutorForPlatformGpuId(platform_gpu_id).ValueOrDie(),
39 platform_gpu_id, false /*use_unified_memory*/, {}, {});
40 GPUTensorPoolAllocator allocator(sub_allocator, "GPU_0_tensorpool", 1 << 30);
41 void* p = allocator.AllocateRaw(32, 100);
42 EXPECT_TRUE(p != nullptr);
43 allocator.DeallocateRaw(p);
44}
45
46TEST(GPUTensorPoolAllocatorTest, SmallAllocationWithAlignment8B) {
47 PlatformGpuId platform_gpu_id(0);

Callers

nothing calls this directly

Calls 6

sleepFunction · 0.85
AllocateRawMethod · 0.45
DeallocateRawMethod · 0.45
emplace_backMethod · 0.45
joinMethod · 0.45
ResetMethod · 0.45

Tested by

no test coverage detected