24.08
|
Go to the documentation of this file.
18 namespace optimizations
23 static void Func(std::shared_ptr<ConstTensorHandle>& handle)
29 std::vector<float> newValues(
info.GetNumElements());
32 info.GetNumElements(),
44 static void Func(std::shared_ptr<ConstTensorHandle>& handle)
50 std::vector<Half> newValues(
info.GetNumElements());
53 info.GetNumElements(),
63 template<
typename Converter,
typename Predicate>
74 if (Predicate::Test(layer))
void OperateOnConstantTensors(Op op)
void Run(Graph &graph, Layer &layer) const override
static bool Test(const Layer &layer)
ConvertConstants()=default
virtual ~ConvertConstants()=default
static void ConvertFloat16To32(const void *srcFloat16Buffer, size_t numElements, float *dstFloat32Buffer)
static bool Test(const Layer &layer)
DataType GetDataType() const
static void ConvertFloat32To16(const float *srcFloat32Buffer, size_t numElements, void *dstFloat16Buffer)
Converts a buffer of FP32 values to FP16, and stores in the given dstFloat16Buffer.
void IgnoreUnused(Ts &&...)
static void Func(std::shared_ptr< ConstTensorHandle > &handle)
Copyright (c) 2021 ARM Limited and Contributors.
A tensor defined by a TensorInfo (shape and data type) and an immutable backing store.
static void Func(std::shared_ptr< ConstTensorHandle > &handle)