tenzr::PadNode¶
Pad an operand with a fill value at the edges and between elements.
#include <node.h>
Inherits from tenzr::Node, std::enable_shared_from_this< Node >
Public Functions¶
| Name | |
|---|---|
| PadNode(std::shared_ptr< Node > operand, std::shared_ptr< Node > padding_value, std::vector< int64_t > edge_padding_low, std::vector< int64_t > edge_padding_high, std::vector< int64_t > interior_padding) | |
| virtual std::string | OpName() const override StableHLO-style name of this node's operation. |
| const std::shared_ptr< Node > & | Operand() const |
| const std::shared_ptr< Node > & | PaddingValue() const The value used to fill padded positions. |
| const std::vector< int64_t > & | EdgePaddingLow() const Low edge padding per dimension. |
| const std::vector< int64_t > & | EdgePaddingHigh() const High edge padding per dimension. |
| const std::vector< int64_t > & | InteriorPadding() const Padding inserted between elements per dimension. |
Additional inherited members¶
Public Functions inherited from tenzr::Node
| Name | |
|---|---|
| Node(NodeKind kind, Shape shape, DType dtype, ShardingSpec sharding =ShardingSpec::Replicated()) | |
| virtual | ~Node() =default |
| NodeKind | Kind() const The node's operation kind. |
| const Shape & | shape() const The node's output shape. |
| DType | Dtype() const The node's output dtype. |
| const ShardingSpec & | Sharding() const The node's sharding spec. |
| void | SetSharding(ShardingSpec spec) Replace the sharding spec. |
| const StridedLayout & | Layout() const The node's strided layout. |
| void | SetLayout(StridedLayout layout) Replace the layout. |
| const std::vector< std::shared_ptr< Node > > & | Inputs() const The node's input operands. |
| uint64_t | Id() const The node's unique id. |
Protected Functions inherited from tenzr::Node
| Name | |
|---|---|
| uint64_t | NextId() |
Protected Attributes inherited from tenzr::Node
| Name | |
|---|---|
| NodeKind | kind_ |
| Shape | shape_ |
| DType | dtype_ |
| ShardingSpec | sharding_ |
| StridedLayout | layout_ |
| std::vector< std::shared_ptr< Node > > | inputs_ |
| uint64_t | id_ |
Public Functions Documentation¶
function PadNode¶
PadNode(
std::shared_ptr< Node > operand,
std::shared_ptr< Node > padding_value,
std::vector< int64_t > edge_padding_low,
std::vector< int64_t > edge_padding_high,
std::vector< int64_t > interior_padding
)
Parameters:
- operand Value to pad.
- padding_value Fill value.
- edge_padding_low Low edge padding per dimension.
- edge_padding_high High edge padding per dimension.
- interior_padding Interior padding per dimension.
Create a padding node, inferring the padded shape.
function OpName¶
StableHLO-style name of this node's operation.
Reimplements: tenzr::Node::OpName
function Operand¶
function PaddingValue¶
The value used to fill padded positions.
function EdgePaddingLow¶
Low edge padding per dimension.
function EdgePaddingHigh¶
High edge padding per dimension.
function InteriorPadding¶
Padding inserted between elements per dimension.