Hi,
I feel like even in “official” code those two are used interchangeably (inconsitently?). Lets take for example cannonical tutorial https://pytorch.org/tutorials/advanced/cpp_extension.html#writing-the-c-op 76
Header of forward pass returns std::vector<at::Tensor> (and where is the casting inside?):
std::vector<at::Tensor> lltm_forward(
    torch::Tensor input,
    torch::Tensor weights,
    torch::Tensor bias,
    torch::Tensor old_h,
    torch::Tensor old_cell)

and then later header of backward pass returns std::vector<torch::Tensor>
std::vector<torch::Tensor> lltm_backward(
    torch::Tensor grad_h,
    torch::Tensor grad_cell,
    torch::Tensor new_cell,
    torch::Tensor input_gate,
    torch::Tensor output_gate,
    torch::Tensor candidate_cell,
    torch::Tensor X,
    torch::Tensor gate_weights,
    torch::Tensor weights)

Regards,