MCPcopy Create free account
hub / github.com/ARM-software/ComputeLibrary / TEST_CASE

Function TEST_CASE

tests/validation/CL/UNIT/TensorAllocator.cpp:131–144  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

129
130/* Validate that an external global allocator can be used for all internal allocations */
131TEST_CASE(ExternalGlobalAllocator, framework::DatasetMode::ALL)
132{
133 DummyAllocator global_tensor_alloc;
134 CLTensorAllocator::set_global_allocator(&global_tensor_alloc);
135
136 // Run a convolution
137 run_conv2d(nullptr /* mm */, global_tensor_alloc);
138
139 // Check that allocator has been called multiple times > 4
140 ARM_COMPUTE_EXPECT(global_tensor_alloc.get_n_calls() > 4, framework::LogLevel::ERRORS);
141
142 // Nullify global allocator
143 CLTensorAllocator::set_global_allocator(nullptr);
144}
145
146/* Validate that an external global allocator can be used for the pool manager */
147TEST_CASE(ExternalGlobalAllocatorMemoryPool, framework::DatasetMode::ALL)

Callers

nothing calls this directly

Calls 15

run_conv2dFunction · 0.85
get_n_callsMethod · 0.80
contextMethod · 0.80
seedMethod · 0.80
is_mappedMethod · 0.80
scaleMethod · 0.80
offsetMethod · 0.80
max_num_valuesMethod · 0.80
enqueueMapBufferMethod · 0.80
enqueueUnmapMemObjectMethod · 0.80

Tested by

no test coverage detected