Integrate texture readback fixes and the optional Agility SDK #128

Closed
TaynanGT wants to merge 433 commits from upstream-pr/128 into main
TaynanGT commented 2026-11-27 03:13:04 +00:00 (Migrated from github.com)

Imported from TaynanGT/Vice-Tay. Originally posted by TaynanGT on 2026-11-27T03:13:04Z.


I split the readback and Agility SDK changes out of #120. This branch carries #92, #118, and #102 on main, with their original commits.

The readback pool stays opt-in and retains the full device-removal report if the fence reports a lost device. In a Series S diagnostic run with the same readback code enabled, the pool recorded 45,713 reuses and zero allocation failures.

Both Clippy configurations passed on this branch. The Windows 10 retest for #84 is still open.

<!-- greyfinch-sync:TaynanGT/Vice-Tay:issue:5520533851 --> Imported from [TaynanGT/Vice-Tay](https://github.com/TaynanGT/Vice-Tay/pull/128). Originally posted by [TaynanGT](https://github.com/TaynanGT) on 2026-11-27T03:13:04Z. --- I split the readback and Agility SDK changes out of #120. This branch carries #92, #118, and #102 on main, with their original commits. The readback pool stays opt-in and retains the full device-removal report if the fence reports a lost device. In a Series S diagnostic run with the same readback code enabled, the pool recorded 45,713 reuses and zero allocation failures. Both Clippy configurations passed on this branch. The Windows 10 retest for #84 is still open.
chatgpt-codex-connector[bot] commented 2026-11-27 03:13:19 +00:00 (Migrated from github.com)

Imported from TaynanGT/Vice-Tay. Originally posted by chatgpt-codex-connector[bot] on 2026-11-27T03:13:19Z.


Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-27T03:15:12.641363Z 5580911 PR opened
🔒 Security Review ✅ Completed 2026-11-27T03:16:18.297138Z 5580911 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

<!-- greyfinch-sync:TaynanGT/Vice-Tay:comment:7208806434 --> Imported from [TaynanGT/Vice-Tay](https://github.com/TaynanGT/Vice-Tay/pull/128#issuecomment-7208806434). Originally posted by [chatgpt-codex-connector[bot]](https://github.com/apps/chatgpt-codex-connector) on 2026-11-27T03:13:19Z. --- <!-- codex-pull-request-review-summary --> <!-- codex-review-state:v1 {"code_review":{"commit_sha":"55809112e90d54f0da1c8a0b491b288f217efdca","has_any_findings":true,"has_unresolved_findings":true,"status":"completed"},"security_review":{"commit_sha":"55809112e90d54f0da1c8a0b491b288f217efdca","has_any_findings":null,"has_unresolved_findings":null,"status":"completed"}} --> <!-- codex-security-review:v1 {"blockingSeverityThreshold":"P0","headSha":"55809112e90d54f0da1c8a0b491b288f217efdca","mergeGateEnabled":false,"pullRequestNumber":128,"repository":"TaynanGT/Vice-Tay","status":"completed"} --> <details> <summary><strong>Codex Review Summary</strong>: ✅ Completed</summary> This comment shows the latest Codex review activity on this pull request. | Review | Status | Commit | Review trigger | | --- | --- | --- | --- | | 📝 **Code Review** | ✅ **Completed** <relative-time datetime="2026-11-27T03:15:12.641363Z">2026-11-27T03:15:12.641363Z</relative-time> | `5580911` | PR opened | | 🔒 **Security Review** | ✅ **Completed** <relative-time datetime="2026-11-27T03:16:18.297138Z">2026-11-27T03:16:18.297138Z</relative-time> | `5580911` | PR opened | <details> <summary>ℹ️ About Codex in GitHub</summary> <br/> [Your team has set up Codex to review pull requests in this repo](https://chatgpt.com/codex/cloud/settings/general). Reviews are triggered when you - Open a pull request for review - Mark a draft as ready - Comment "@codex review" or "@codex security review". Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. </details> </details>
chatgpt-codex-connector[bot] commented 2026-11-27 03:15:10 +00:00 (Migrated from github.com)

Imported from TaynanGT/Vice-Tay. Originally posted by chatgpt-codex-connector[bot] on 2026-11-27T03:15:10Z.

Code review location: crates/victory-gpu/src/host.rs; line 4019

@@ -3686,6 +4014,10 @@ fn relay_worker() {
                     .collect();
                 // SAFETY: a plain query.
                 let completed = unsafe { host.fence.GetCompletedValue() };
+                if texture_readback_idle_limit() != 0 && completed == u64::MAX {
+                    drop(line);
+                    fail(format_args!("texture readback pool cannot retire after device removal"));

P2 Badge Preserve removal diagnostics in the relay fence guard

When the readback pool and relay are enabled and the device is removed, this guard aborts before Host::relay_land can produce its existing report containing removal_data(&runs) and last_notes(&runs). Although fail() can log DRED data separately through log_removal_context(), that fallback uses an empty run list and does not include the per-submission report in the failure callback's text. Consequently, enabling the pool loses diagnostic context precisely when investigating a GPU failure. Collect the queued runs and preserve the existing removal report before aborting, as the synchronous fence checks now do.

Useful? React with 👍 / 👎.

<!-- greyfinch-sync:TaynanGT/Vice-Tay:review-comment:4715328263 --> Imported from [TaynanGT/Vice-Tay](https://github.com/TaynanGT/Vice-Tay/pull/128#discussion_r4715328263). Originally posted by [chatgpt-codex-connector[bot]](https://github.com/apps/chatgpt-codex-connector) on 2026-11-27T03:15:10Z. **Code review location:** `crates/victory-gpu/src/host.rs`; line 4019 ~~~~diff @@ -3686,6 +4014,10 @@ fn relay_worker() { .collect(); // SAFETY: a plain query. let completed = unsafe { host.fence.GetCompletedValue() }; + if texture_readback_idle_limit() != 0 && completed == u64::MAX { + drop(line); + fail(format_args!("texture readback pool cannot retire after device removal")); ~~~~ --- **<sub><sub>![P2 Badge](https://img.shields.io/badge/P2-yellow?style=flat)</sub></sub> Preserve removal diagnostics in the relay fence guard** When the readback pool and relay are enabled and the device is removed, this guard aborts before `Host::relay_land` can produce its existing report containing `removal_data(&runs)` and `last_notes(&runs)`. Although `fail()` can log DRED data separately through `log_removal_context()`, that fallback uses an empty run list and does not include the per-submission report in the failure callback's text. Consequently, enabling the pool loses diagnostic context precisely when investigating a GPU failure. Collect the queued runs and preserve the existing removal report before aborting, as the synchronous fence checks now do. Useful? React with 👍 / 👎. <!-- codex-code-review-finding:v1 -->
chatgpt-codex-connector[bot] commented 2026-11-27 03:15:10 +00:00 (Migrated from github.com)

Imported from TaynanGT/Vice-Tay. Originally posted by chatgpt-codex-connector[bot] on 2026-11-27T03:15:10Z.

Review: COMMENTED


💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 55809112e9

ℹ️ 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".

<!-- greyfinch-sync:TaynanGT/Vice-Tay:review:6082996115 --> Imported from [TaynanGT/Vice-Tay](https://github.com/TaynanGT/Vice-Tay/pull/128#pullrequestreview-6082996115). Originally posted by [chatgpt-codex-connector[bot]](https://github.com/apps/chatgpt-codex-connector) on 2026-11-27T03:15:10Z. **Review:** COMMENTED --- <!-- codex-review-receipt:v1 --> ### 💡 Codex Review Here are some automated review suggestions for this pull request. **Reviewed commit:** `55809112e9` <details> <summary>ℹ️ About Codex in GitHub</summary> <br/> [Your team has set up Codex to review pull requests in this repo](https://chatgpt.com/codex/cloud/settings/general). 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". </details>
TaynanGT commented 2026-11-27 03:41:18 +00:00 (Migrated from github.com)

Imported from TaynanGT/Vice-Tay. Originally posted by TaynanGT on 2026-11-27T03:41:18Z.


I moved the same readback and Agility SDK fixes to #130 on the current main.

<!-- greyfinch-sync:TaynanGT/Vice-Tay:comment:7209191037 --> Imported from [TaynanGT/Vice-Tay](https://github.com/TaynanGT/Vice-Tay/pull/128#issuecomment-7209191037). Originally posted by [TaynanGT](https://github.com/TaynanGT) on 2026-11-27T03:41:18Z. --- I moved the same readback and Agility SDK fixes to #130 on the current main.
TaynanGT commented 2026-11-29 19:11:32 +00:00 (Migrated from github.com)

Imported from TaynanGT/Vice-Tay. Originally posted by TaynanGT on 2026-11-29T19:11:32Z.

Code review location: crates/victory-gpu/src/host.rs; line 4019

@@ -3686,6 +4014,10 @@ fn relay_worker() {
                     .collect();
                 // SAFETY: a plain query.
                 let completed = unsafe { host.fence.GetCompletedValue() };
+                if texture_readback_idle_limit() != 0 && completed == u64::MAX {
+                    drop(line);
+                    fail(format_args!("texture readback pool cannot retire after device removal"));

The current relay_land path collects the outstanding flights' host lists and includes removal_data and last_notes in the failure report when the device has been removed. That preserves the per-submission context in this path.

<!-- greyfinch-sync:TaynanGT/Vice-Tay:review-comment:4732760816 --> Imported from [TaynanGT/Vice-Tay](https://github.com/TaynanGT/Vice-Tay/pull/128#discussion_r4732760816). Originally posted by [TaynanGT](https://github.com/TaynanGT) on 2026-11-29T19:11:32Z. **Code review location:** `crates/victory-gpu/src/host.rs`; line 4019 ~~~~diff @@ -3686,6 +4014,10 @@ fn relay_worker() { .collect(); // SAFETY: a plain query. let completed = unsafe { host.fence.GetCompletedValue() }; + if texture_readback_idle_limit() != 0 && completed == u64::MAX { + drop(line); + fail(format_args!("texture readback pool cannot retire after device removal")); ~~~~ --- The current relay_land path collects the outstanding flights' host lists and includes removal_data and last_notes in the failure report when the device has been removed. That preserves the per-submission context in this path.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
TaynanGT/Vice-Tay!128
No description provided.