Closed
Conversation
| const auto* output_end = output + output_shape.Size(); | ||
| auto output_tensor_ptr = ctx->Output(0, output_shape); | ||
| int64_t output_size = output_shape.Size(); | ||
| if (0 == output_size) { |
Contributor
There was a problem hiding this comment.
Doesn't the below code just do nothing if output_size is zero?
Contributor
Author
There was a problem hiding this comment.
Contributor
There was a problem hiding this comment.
You should put a comment saying that we must do this check then, then it's clear it's not just an optimization.
RyanUnderhill
suggested changes
Dec 14, 2018
Contributor
RyanUnderhill
left a comment
There was a problem hiding this comment.
We talked offline, but writing it down here so we don't forget. Can you compile it to see the before/after of the file size to see how many bytes we save by this new version?
This was referenced Jan 27, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.