def broadcast_to
import bendtorch-core@0.1.0.0/src/autograd/broadcast.bend as Broadcastimport Base
import bendtorch-core@0.1.0.0/src/shape/core.bend as Shape
import bendtorch-core@0.1.0.0/src/tensor/core.bend as Core
51# The input owner comes back unchanged next to the result. An incompatible
52# shape pair fails with the planner's broadcast error; a compatible pair whose
53# broadcast is larger than the target (for example [3] to [1]) fails with
54# NotBroadcastable.
55def broadcast_to(input: Core.Dynamic, +target: Shape.Shape) -> Core.Dynamic & Result<&2, &1, Error, Core.Dynamic>:
56 Core.Packed{+shape, tensor} = input
57 planned(Core.Packed{shape, tensor}, target, Shape.broadcast_checked(shape, target))
Uses (7)
Used by (12)
- bendtorch-core@0.1.0.0/src/autograd/tensor_backward:vjp_sum
- bendtorch-core@0.1.0.0/src/autograd/broadcast_pointwise_PROOF:run_lift
- bendtorch-core@0.1.0.0/src/autograd/broadcast:broadcast_to_dimensions_result
- bendtorch-core@0.1.0.0/src/autograd/broadcast_pointwise_LAWS:broadcast_to_pointwise
- bendtorch-core@0.1.0.0/src/autograd/broadcast_pointwise_PROOF:broadcast_to_pointwise
- …