40 return layout_.shape().at(1);
53 std::unique_ptr<data_flow::DataFlowNode>
56 std::string
toStr()
const override;
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.
Base class for all library nodes in the dataflow graph.
Definition library_node.h:106
Definition batchnorm_node.h:70
symbolic::SymbolSet symbols() const override
Get all symbols used in this node.
std::string toStr() const override
Convert node to string representation.
data_flow::PointerAccessType pointer_access_type(int input_idx) const override
Describes what a pointer is used for.
QuantizationType quantization() const
void replace(const symbolic::ExpressionMapping &replacements) override
const TensorLayout & batch_layout() const
Definition batchnorm_node.h:32
void set_quantization(const QuantizationType quant)
passes::LibNodeExpander::ExpandOutcome expand(passes::LibNodeExpander::ExpandContext &context, structured_control_flow::Block &block) override
Expand this node into its internal operations.
BatchNormNode(size_t element_id, const DebugInfo &debug_info, graph::Vertex vertex, data_flow::DataFlowGraph &parent, TensorLayout layout, QuantizationType quantization, data_flow::ImplementationType impl_type=data_flow::ImplementationType_NONE)
void replace(const symbolic::Expression old_expression, const symbolic::Expression new_expression) override
symbolic::Expression num_features() const
In N,C,D0...Dn layout, always C.
Definition batchnorm_node.h:39
symbolic::Expression flop() const override
Calculate floating point operations for this node.
bool supports_integer_types() const override
Check if this operation supports integer types.
Definition batchnorm_node.h:63
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.
The metadata associated with a addressing a tensor in elements Meant to be used with TensorNodes to d...
Definition tensor_layout.h:20
TensorNode(size_t element_id, const DebugInfo &debug_info, const graph::Vertex vertex, data_flow::DataFlowGraph &parent, const data_flow::LibraryNodeCode &code, const std::vector< std::string > &outputs, const std::vector< std::string > &inputs, const data_flow::ImplementationType &impl_type)
Construct a tensor node.
Definition lib_node_expander.h:122
Base class for library node serialization.
Definition json_serializer.h:195
A control flow node representing a basic block with dataflow computations.
Definition block.h:42
SymEngine::RCP< const SymEngine::Basic > Expression
Reference-counted pointer to a symbolic expression (SymEngine Basic).
Definition symbolic.h:83
std::set< Symbol, SymEngine::RCPBasicKeyLess > SymbolSet
Ordered set of symbols.
Definition symbolic.h:95
SymEngine::map_basic_basic ExpressionMapping
Definition symbolic.h:109
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
std::unique_ptr< PointerAccessMeta, PtrAccessDeleter > PointerAccessType
Definition pointer_metadata.h:32
boost::graph_traits< Graph >::vertex_descriptor Vertex
Definition graph.h:25
Definition arange_node.h:8
data_flow::LibraryNodeCode LibraryNodeType_BatchNorm("ml::BatchNorm")
types::PrimitiveType QuantizationType
Definition tensor_node.h:26
Definition lib_node_expander.h:12
Abstract base class for tensor library nodes.