Skip to content

Conversation

@NicolasHug
Copy link
Contributor

This is a small clean-up that I forgot to do in #317

getFrameAtIndex() was / is never called with its optional preAllocatedTensorOutput parameter, so this PR removes it. This makes getFrameAtIndex() consistent with the other high-level entry-points, which do not accept preAllocatedTensorOutput either.

In the future, we'll probably want to put back this parameter for users to pass their own pre-allocated tensors, but we should add that consistently across all entry-points.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Meta Open Source bot. label Oct 30, 2024

DecodedOutput getFrameAtIndex(
DecodedOutput getFrameAtIndex(int streamIndex, int64_t frameIndex);
DecodedOutput getFrameAtIndexInternal(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I had to move this one back to public unfortunately, because we must now rely on this one for our C++ tests. Eventually once we accept pre-allocated tensors in all high-level entrypoints, we'll be able to move it back to private.

Copy link
Contributor

@scotts scotts Oct 30, 2024

Choose a reason for hiding this comment

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

We could also use the friend declaration, but I'd prefer not to even mention the testing class in the implementation. I think this is fine.

Can we put a comment here, saying that morally this is a private member function, and the conditions for making it so?

@NicolasHug NicolasHug merged commit 68939a9 into meta-pytorch:main Oct 31, 2024
37 of 40 checks passed
@NicolasHug NicolasHug deleted the alfenjealn branch October 31, 2024 09:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants