23.08
|
Go to the documentation of this file.
39 #if !defined(BARE_METAL)
41 #endif // !defined(BARE_METAL)
81 src.allocator()->allocate();
82 dst.allocator()->allocate();
88 std::tie(min_bound, max_bound) = get_activation_layer_test_bounds<float>(ActivationLayerInfo::ActivationFunction::LINEAR,
DataType::F32);
89 std::uniform_real_distribution<>
distribution(min_bound, max_bound);
96 #if !defined(BARE_METAL)
117 act_layer_thread0.configure(&src_t0, &dst_t0, activation_info);
118 act_layer_thread1.configure(&src_t1, &dst_t1, activation_info);
136 std::tie(min_bound, max_bound) = get_activation_layer_test_bounds<float>(ActivationLayerInfo::ActivationFunction::LINEAR,
DataType::F32);
137 std::uniform_real_distribution<>
distribution(min_bound, max_bound);
141 std::thread neon_thread1([&] { act_layer_thread0.run(); });
142 std::thread neon_thread2([&] { act_layer_thread1.run(); });
153 const bool match = (*
reinterpret_cast<float *
>(t0_it.ptr()) == *
reinterpret_cast<float *
>(t1_it.ptr()));
158 #endif // !defined(BARE_METAL)
TEST_SUITE_END() FIXTURE_DATA_TEST_CASE(RunSmall
[CLActivationLayer Test snippet]
TEST_CASE(FusedActivation, framework::DatasetMode::ALL)
Validate fused activation expecting the following behaviours:
SimpleTensor< float > src
virtual const TensorShape & tensor_shape() const =0
Size for each dimension of the tensor.
IAssetManager * asset_manager() override
Asset manager accessor.
void use_tensor_dimensions(const TensorShape &shape, size_t first_dimension=Window::DimX)
Use the tensor's dimensions to fill the window dimensions.
Accessor implementation for Tensor objects.
Activation Layer Information class.
void configure(ITensor *input, ITensor *output, ActivationLayerInfo activation_info)
[NEActivationLayer snippet]
TensorAllocator * allocator()
Return a pointer to the tensor's allocator.
ARM_COMPUTE_EXPECT(has_error==expected, framework::LogLevel::ERRORS)
Iterator updated by execute_window_loop for each window element.
Basic function to run cpu::kernels::CpuActivationKernel.
#define ARM_COMPUTE_ASSERT(cond)
static std::unique_ptr< IScheduler > create(Type type=_default_type)
Create a scheduler depending on the scheduler type.
ITensorInfo * info() const override
Interface to be implemented by the child class to return the tensor's metadata.
std::unique_ptr< AssetsLibrary > library
Configurable scheduler which supports multiple multithreading APIs and choosing between different sch...
virtual bool is_resizable() const =0
Flag indicating whether the size of the tensor can be changed.
Describe a multidimensional execution window.
void allocate() override
Allocate size specified by TensorInfo of CPU memory.
Copyright (c) 2017-2023 Arm Limited.
TEST_SUITE(QASYMM8_to_F32) FIXTURE_DATA_TEST_CASE(RunSmall
IScheduler * scheduler() override
Scheduler accessor.
std::uniform_real_distribution< float > distribution(-5.f, 5.f)
@ F32
32-bit floating-point number
Basic implementation of the tensor interface.
void execute_window_loop(const Window &w, L &&lambda_function, Ts &&... iterators)
Iterate through the passed window, automatically adjusting the iterators and calling the lambda_funct...
void run() override
Run the kernels contained in the function.
DatasetMode
Possible dataset modes.
void set_scheduler(IScheduler *scheduler)
CPU Scheduler setter.