Reduce peak VRAM usage in Diamond WE. #133
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 90e2ea25c3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| let chunk_cols = Self::preimage_chunk_cols(total_cols).unwrap_or_else(|| { | ||
| panic!( | ||
| "DiamondWE missing full preimage artifact {id} and chunking is disabled for total_cols={total_cols}" | ||
| ) | ||
| }); |
There was a problem hiding this comment.
Persist preimage chunk layout for decoding
When a ciphertext is encrypted with chunked preimages under one AUX_SAMPLING_CHUNK_WIDTH and decoded later after that variable is changed or unset, no full preimage artifact exists and this recomputes chunk_cols from the current environment rather than the layout used to write the files. The decoder will then look for different chunk boundaries and can panic on a missing artifact or column-count mismatch, so the chunk width/count needs to be stored with the artifacts/ciphertext or discovered from the persisted chunks.
Useful? React with 👍 / 👎.
Summary