triton.language.broadcast_to¶
- triton.language.broadcast_to(input, *shape)¶
Tries to broadcast the given tensor to a new
shape
.- Parameters:
input (Block) – The input tensor.
shape – The desired shape.
shape
can be passed as a tuple or as individual parameters:# These are equivalent broadcast_to(x, (32, 32)) broadcast_to(x, 32, 32)
This function can also be called as a member function on
tensor
, asx.broadcast_to(...)
instead ofbroadcast_to(x, ...)
.