test: SPIR-V translation tests for image_sample_d and image_sample_d_cl (OLD-10031) #1032

Merged
TanmaySatyam merged 1 commit from upstream-pr/1032 into main 2026-11-28 11:41:42 +00:00
TanmaySatyam commented 2026-11-24 17:04:40 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by TanmaySatyam on 2026-11-24T17:04:40Z.


Summary

Claims and carries OLD-10031 (Draft PR #299, old-pr/10031 authored by @Ritolino, original authorship preserved cleanly onto main):

  • Adds ests/test_image_sample_d_translate.py (12 unit tests) exercising SPIR-V translation of image_sample_d and image_sample_d_cl (explicit gradients, optional clamp, 1D/2D/3D/array/cube dimensions, and spirv-as + spirv-val validation).

Verification

  • Unit & translation tests (Windows 11, Python 3.12, RTX 5070 host, Vulkan SDK spirv-as/spirv-val):
    • python -I tests/test_image_sample_d_translate.py -> 12/12 OK (0.272 s)
    • python -I tests/test_text_write_line_endings.py -> 3/3 OK
    • python -m compileall -q tests/test_image_sample_d_translate.py -> exit
<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5476742837 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1032). Originally posted by [TanmaySatyam](https://github.com/TanmaySatyam) on 2026-11-24T17:04:40Z. --- ### Summary Claims and carries **OLD-10031** (Draft PR #299, old-pr/10031 authored by @Ritolino, original authorship preserved cleanly onto main): - Adds ests/test_image_sample_d_translate.py (12 unit tests) exercising SPIR-V translation of image_sample_d and image_sample_d_cl (explicit gradients, optional clamp, 1D/2D/3D/array/cube dimensions, and spirv-as + spirv-val validation). ### Verification - **Unit & translation tests (Windows 11, Python 3.12, RTX 5070 host, Vulkan SDK spirv-as/spirv-val):** - python -I tests/test_image_sample_d_translate.py -> 12/12 OK (0.272 s) - python -I tests/test_text_write_line_endings.py -> 3/3 OK - python -m compileall -q tests/test_image_sample_d_translate.py -> exit
sodove commented 2026-11-28 11:26:27 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by sodove on 2026-11-28T11:26:27Z.


#1032 | head ce8e0d95715dd604750be6d893b94aacd3b4c1f2 | python3 -I tests/test_image_sample_d_translate.py -v | red: 12 passed | green: 12 passed | Passed on both trees

The PR adds tests for the existing translator. All 12 already passed on main. As an additional check I captured the 13 distinct complete modules returned by the merged translator during this file and assembled and validated each for Vulkan 1.2 with SPIRV-Tools.

Copied the PR tests onto clean main 4a54aedcb6b66525e0c9f72a6ea10263337c9141 for the baseline, then merged that main into the recorded PR head and reran those files. Ubuntu 26.04.1 (WSL2), Python 3.14.4. Unittest failure/error counts include subtests where applicable. AI-assisted with OpenAI Codex. Batch claim.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7238552949 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1032#issuecomment-7238552949). Originally posted by [sodove](https://github.com/sodove) on 2026-11-28T11:26:27Z. --- #1032 | head `ce8e0d95715dd604750be6d893b94aacd3b4c1f2` | `python3 -I tests/test_image_sample_d_translate.py -v` | red: 12 passed | green: 12 passed | **Passed on both trees** The PR adds tests for the existing translator. All 12 already passed on main. As an additional check I captured the 13 distinct complete modules returned by the merged translator during this file and assembled and validated each for Vulkan 1.2 with SPIRV-Tools. Copied the PR tests onto clean main `4a54aedcb6b66525e0c9f72a6ea10263337c9141` for the baseline, then merged that main into the recorded PR head and reran those files. Ubuntu 26.04.1 (WSL2), Python 3.14.4. Unittest failure/error counts include subtests where applicable. AI-assisted with OpenAI Codex. [Batch claim](https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7238450840).
DadaCap commented 2026-11-28 11:41:45 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by DadaCap on 2026-11-28T11:41:45Z.


Merged, thank you @TanmaySatyam! This PR (test: SPIR-V translation tests for image_sample_d and image_sample_d_cl (OLD-10031)) passed its own tests with main merged in during sodove's verification of this shader batch, so it went in with the batch.

AI-assisted (Claude Code, Claude Opus 5.5), posted for the maintainers.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7238721286 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1032#issuecomment-7238721286). Originally posted by [DadaCap](https://github.com/DadaCap) on 2026-11-28T11:41:45Z. --- Merged, thank you @TanmaySatyam! This PR (test: SPIR-V translation tests for image_sample_d and image_sample_d_cl (OLD-10031)) passed its own tests with main merged in during sodove's verification of this shader batch, so it went in with the batch. AI-assisted (Claude Code, Claude Opus 5.5), posted for the maintainers.
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
ProjectLeonida/mandy!1032
No description provided.