Class: Kumi::IR::Vec::Ops::AxisBroadcast
- Inherits:
-
Node
- Object
- Base::Instruction
- Node
- Kumi::IR::Vec::Ops::AxisBroadcast
- Defined in:
- lib/kumi/ir/vec/ops/core_ops.rb
Instance Attribute Summary
Attributes inherited from Base::Instruction
#attributes, #axes, #dtype, #effects, #inputs, #metadata, #opcode, #result
Instance Method Summary collapse
-
#initialize(value:, from_axes:, to_axes:, **kwargs) ⇒ AxisBroadcast
constructor
A new instance of AxisBroadcast.
Methods inherited from Node
Methods inherited from Base::Instruction
#control_effect?, #defs, #effectful?, #io_effect?, #memory_effect?, #normalized_attributes, #printer_attributes, #printer_axes, #printer_dtype, #produces?, #stamp, #state_effect?, #to_h, #to_print_string, #uses, #validate!, #value_signature, #with_metadata
Constructor Details
#initialize(value:, from_axes:, to_axes:, **kwargs) ⇒ AxisBroadcast
Returns a new instance of AxisBroadcast.
54 55 56 57 58 59 60 |
# File 'lib/kumi/ir/vec/ops/core_ops.rb', line 54 def initialize(value:, from_axes:, to_axes:, **kwargs) attrs = { from_axes: Array(from_axes).map(&:to_sym), to_axes: Array(to_axes).map(&:to_sym) } super(inputs: [value], attributes: attrs, axes: attrs[:to_axes], **kwargs) end |