24.02.1
|
Go to the documentation of this file.
24 #ifndef SRC_DYNAMIC_FUSION_SKETCH_GPU_TEMPLATE_WRITER_GPUKERNELVARIABLETABLE
25 #define SRC_DYNAMIC_FUSION_SKETCH_GPU_TEMPLATE_WRITER_GPUKERNELVARIABLETABLE
35 #include <type_traits>
36 #include <unordered_map>
40 namespace experimental
42 namespace dynamic_fusion
44 class GpuKernelComponentGroup;
83 const std::string &alias =
"unnamed");
101 std::map<ITensorInfo::Id, TensorVariable> _vars{};
112 template <
typename T, ARM_COMPUTE_REQUIRES_TA(std::is_
integral<T>::value)>
117 TagVal(
const std::string &val);
130 using TagLUT = std::unordered_map<Tag, TagVal>;
std::string to_string(T &&value)
Convert integer and float values to string.
A tensor variable whose main purposes are:
std::vector< TensorVariable > VariableList
std::unordered_map< Tag, TagVal > TagLUT
Tag lookup table.
std::string value
Get the value of the TagVal as a converted string.
GpuKernelArgumentInfo kernel_argument_info
A tag value will substitute a tag in a string template during its instantiation.
std::string Tag
A tag used in a string template is a placeholder string to be substituted by real values during templ...
int32_t Id
An id that uniquely identifies an ITensorInfo within some domain (e.g.
Contain information required to set up a kernel argument at run time.
CLTensor * tensor
Pointer to the auxiliary tensor.
TensorVariable get_variable(const ITensorInfo *tensor) const
Get the TensorVariable associated with tensor.
bool has_valid_id() const
static constexpr Id invalid_tensor_id
An invalid tensor id within a domain.
Copyright (c) 2017-2024 Arm Limited.
TagVal(T val)
Construct a TagVal from an integral type.
TensorVariable & operator=(const TensorVariable &)=default
A group of gpu kernel components to be fused together PRECONDITIONS:
Store the tensor's metadata.
A table of all the variables used in the kernel.
void declare_variable(const GpuKernelComponentGroup &comp_group, const ITensorInfo *tensor, GpuKernelArgumentInfo argument_info, const std::string &alias="unnamed")
Declare a TensorVariable for a corresponding tensor info.
VariableList get_variable_list(const std::vector< const ITensorInfo * > &tensors) const
Get the TensorVariable list associated with tensors.
DataType
Available data types.
TagVal()=default
Default constructor.