Skip to content
fn

cube_op

→TensorImplPtr
int cube_op(const int & a)

Compute y=x3y = x^3 element-wise.

Allocates a fresh output of the same shape and dtype as a and delegates to CubeBackward::forward.

See Also

CubeBackward — backward node.

Parameters

aTensorImplPtr
Input tensor of any shape.

Returns

TensorImplPtr

Output tensor of the same shape and dtype.