docc 0.8.3 (0d44999b)
C++ API Reference
Loading...
Searching...
No Matches
fill_node.h
Go to the documentation of this file.
1#pragma once
2
4
5namespace sdfg {
6namespace math {
7namespace tensor {
8
10
12public:
14 size_t element_id,
15 const DebugInfo& debug_info,
18 const std::vector<symbolic::Expression>& shape,
21 );
22
26 std::vector<ElementInput>& needed_inputs,
27 types ::PrimitiveType expected_type
28 ) override;
29
30 bool supports_integer_types() const override {
31 return true;
32 }
33
34 int tensor_input_count() const override {
35 return 1;
36 }
37
38 void validate_non_tensor_inputs(const data_flow::DataFlowGraph& grap) const override;
39
40 std::unique_ptr<data_flow::DataFlowNode>
41 clone(size_t element_id, const graph::Vertex vertex, data_flow::DataFlowGraph& parent) const override;
42};
43
45
46
47} // namespace tensor
48} // namespace math
49} // namespace sdfg
Definition element.h:30
size_t element_id() const
const DebugInfo & debug_info() const
Note: Even though the class references unique_ptr, it will never delete an SDFG it has a reference to...
Definition structured_sdfg_builder.h:44
Definition data_flow_graph.h:29
graph::Vertex vertex() const
Get the graph vertex for this node.
ElementWiseDataflowTensorNode(size_t element_id, const DebugInfo &debug_info, const graph::Vertex vertex, data_flow::DataFlowGraph &parent, const data_flow::LibraryNodeCode &code, const std::vector< symbolic::Expression > &shape, const std::string &modified_tensor_conn, const std::vector< std::string > &tensor_inputs, QuantizationType quantization=QUANTIZATION_MATCH_INPUTS, const data_flow::ImplementationType &impl_type=data_flow::ImplementationType_NONE)
QuantizationType quantization() const
Definition elementwise_node.h:136
const std::vector< symbolic::Expression > & shape() const
Get the tensor shape.
Definition elementwise_node.h:174
std::unique_ptr< data_flow::DataFlowNode > clone(size_t element_id, const graph::Vertex vertex, data_flow::DataFlowGraph &parent) const override
Clone this node for graph transformations.
int tensor_input_count() const override
How many inputs, starting with 0 are full tensors?
Definition fill_node.h:34
bool supports_integer_types() const override
Check if this operation supports integer types.
Definition fill_node.h:30
void validate_non_tensor_inputs(const data_flow::DataFlowGraph &grap) const override
by default, everything after the tensors is mandated to be scalar.
ElementOutput expand_operation_dataflow(builder::StructuredSDFGBuilder &builder, structured_control_flow::Block &block, std::vector< ElementInput > &needed_inputs, types ::PrimitiveType expected_type) override
FillNode(size_t element_id, const DebugInfo &debug_info, const graph::Vertex vertex, data_flow::DataFlowGraph &parent, const std::vector< symbolic::Expression > &shape, QuantizationType quantization=QUANTIZATION_MATCH_INPUTS, const data_flow::ImplementationType &impl_type=data_flow::ImplementationType_NONE)
A control flow node representing a basic block with dataflow computations.
Definition block.h:42
Tensor elementwise operation nodes.
Definition function_builder.h:10
StringEnum ImplementationType
Implementation type identifier for library nodes.
Definition library_node.h:75
StringEnum LibraryNodeCode
Definition library_node.h:65
ImplementationType ImplementationType_NONE
Default implementation type indicating no specific implementation.
Definition library_node.h:84
boost::graph_traits< Graph >::vertex_descriptor Vertex
Definition graph.h:25
Definition arange_node.h:8
constexpr QuantizationType QUANTIZATION_MATCH_INPUTS
Definition tensor_node.h:27
types::PrimitiveType QuantizationType
Definition tensor_node.h:26
SimpleElementWiseDataflowTensorNodeSerializer< FillNode > FillNodeSerializer
Definition fill_node.h:44
data_flow::LibraryNodeCode LibraryNodeType_Fill("ml::Fill")
Definition batched_gemm_node.h:12
Definition analysis.h:7