30 #include "tests/datasets/ConvertPolicyDataset.h" 31 #include "tests/datasets/ShapeDatasets.h" 36 #include "tests/validation/fixtures/CastFixture.h" 47 constexpr AbsoluteTolerance<float> one_tolerance(1);
48 constexpr AbsoluteTolerance<float> zero_tolerance(0);
126 template <
typename T>
128 template <
typename T>
130 template <
typename T>
132 template <
typename T>
134 template <
typename T>
136 template <
typename T>
138 template <
typename T>
140 template <
typename T>
143 #define CAST_SUITE(NAME, idt, odt, type, dataset, tolerance) \ 145 FIXTURE_DATA_TEST_CASE(RunSmall, type, framework::DatasetMode::PRECOMMIT, combine(combine(datasets::SmallShapes(), dataset), \ 146 datasets::ConvertPolicies())) \ 148 validate(CLAccessor(_target), _reference, tolerance); \
CastValidationFixture< CLTensor, CLAccessor, CLCast, T, uint32_t > CLCastToU32Fixture
1 channel, 1 U8 per channel
#define CAST_SUITE(NAME, idt, odt, type, dataset, tolerance)
half_float::half half
16-bit floating point type
1 channel, 1 F32 per channel
CastValidationFixture< CLTensor, CLAccessor, CLCast, T, int8_t > CLCastToS8Fixture
1 channel, 1 U16 per channel
std::enable_if< is_container< T >::value, ContainerDataset< T > >::type make(std::string name, T &&values)
Helper function to create a ContainerDataset.
Copyright (c) 2017-2021 Arm Limited.
1 channel, 1 F16 per channel
CastValidationFixture< CLTensor, CLAccessor, CLCast, T, int16_t > CLCastToS16Fixture
1 channel, 1 S32 per channel
1 channel, 1 U32 per channel
TEST_SUITE_END() FIXTURE_DATA_TEST_CASE(RunSmall
[CLActivationLayer Test snippet]
CastValidationFixture< CLTensor, CLAccessor, CLCast, T, float > CLCastToF32Fixture
TEST_SUITE(U8_to_S8) FIXTURE_DATA_TEST_CASE(RunSmall
CastValidationFixture< CLTensor, CLAccessor, CLCast, T, uint8_t > CLCastToU8Fixture
1 channel, 1 S16 per channel
CastValidationFixture< CLTensor, CLAccessor, CLCast, T, uint16_t > CLCastToU16Fixture
CastValidationFixture< CLTensor, CLAccessor, CLCast, T, int32_t > CLCastToS32Fixture
DataType
Available data types.
combine(datasets::SmallShapes(), framework::dataset::make("DataType", DataType::F32)))
CastValidationFixture< CLTensor, CLAccessor, CLCast, T, half > CLCastToF16Fixture