Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#5044: Add optional output tensor for backward ops #8592

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

bharane-ab
Copy link
Contributor

@bharane-ab bharane-ab commented May 17, 2024

Add optional output tensor support for backward op addcmul.
Primary issue : #5044

Copy link
Contributor

@eyonland eyonland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to return a std::optional<Tensor> and not return a std::vector of these?

output_tensor.at(0) = std::nullopt;
}
if(are_required_outputs.at(1)){
output_tensor.at(1) = mul(grad, tensor2, std::nullopt, output_mem_config);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please refer to this comment for more details.

@bharane-ab bharane-ab force-pushed the bharane/backward_optional_output branch from 7e51017 to a68f91a Compare June 5, 2024 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants