| 129 | |
| 130 | /* Validate that an external global allocator can be used for all internal allocations */ |
| 131 | TEST_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 */ |
| 147 | TEST_CASE(ExternalGlobalAllocatorMemoryPool, framework::DatasetMode::ALL) |
nothing calls this directly
no test coverage detected