Skip to content

Conversation

NicolasHug
Copy link
Contributor

@NicolasHug NicolasHug commented Oct 4, 2025

This PR addresses a bunch of P0 TODOs:

  • applyBSF() now returns a packet, instead of modifying its input in-inplace. This returned packet still needs to be allocated before calling applyBSF(), which is slightly un-natural, but needed due to how we defined lifetime of the underlying resources with AutoAVPacket and ReferenceAVPacket.
  • The destructor now properly cleans up the resources... To the best of our abilities. DALI doesn't seem to do any kind of cleanup anyway, so we're probably fine. We still try to clean as many things as we can, just to be safe.
  • The isFlushing_ member was not needed so it was removed
  • The map / unmap logic was re-worked. We were previously un-mapping an output surface immediately after it was mapped. But that was running the potential risk that the associated frame pointer would be dangling (there's no doc to confirm that though). Things were working fine before so the pointer was very likely not dangling, but now we circumvent this problem by only un-mapping at the very last moment, at a time where we know with certainty that the pointer's underlying data was copied or discarded.

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Meta Open Source bot. label Oct 4, 2025
@NicolasHug NicolasHug merged commit 3fa5271 into meta-pytorch:main Oct 4, 2025
50 checks passed
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.

1 participant