[Test] Run the ndarray autodiff tests on Metal and restrict f64 to where it is required.#800
Merged
Merged
Conversation
hughperkins
reviewed
Jul 20, 2026
| from tests import test_utils | ||
|
|
||
| archs_support_ndarray_ad = [qd.cpu, qd.cuda, qd.amdgpu] | ||
| archs_support_ndarray_ad = [qd.cpu, qd.cuda, qd.amdgpu, qd.metal] |
Collaborator
There was a problem hiding this comment.
vulkan is still excluded?
Contributor
Author
There was a problem hiding this comment.
Yes. Vulkan is half-broken at the moment. Exploring...
Collaborator
There was a problem hiding this comment.
Ok. Not pushing to fix it. (was just asking on the off-chance we could simply drop the list of platforms altogether, and run on all)
duburcqa
force-pushed
the
duburcqa/broaden_ndarray_ad_test_backends
branch
from
July 20, 2026 19:07
c10c1a6 to
1beb1a6
Compare
duburcqa
changed the base branch from
main
to
duburcqa/fix_adstack_tensor_loop_carried_grad
July 20, 2026 19:07
Collaborator
what is changing:
ok to merge |
Base automatically changed from
duburcqa/fix_adstack_tensor_loop_carried_grad
to
main
July 21, 2026 19:08
…ere it is required. The ndarray reverse-mode autodiff tests were pinned to `[cpu, cuda, amdgpu]`, which skipped Metal even though ndarray autodiff works there. Most tests only carried `default_fp=qd.f64` (or f64-typed dataclass ndarrays) incidentally - their arrays are f32 and their assertions are exact small integers or trivial (fibonacci, powers of two, sin(0)/cos(0)) - so f64 was not load-bearing. Drop f64 from those so they run on Metal too, and convert the dataclass ndarray tests from f64 to f32 for the same reason. The few tests that genuinely need f64 (an explicit `qd.cast(..., f64)` body, f64-typed ndarrays, or f64 fields) now require `qd.extension.data64`, so they skip cleanly on backends without 64-bit support instead of raising. Metal is added to the shared arch list.
duburcqa
force-pushed
the
duburcqa/broaden_ndarray_ad_test_backends
branch
from
July 21, 2026 19:22
1beb1a6 to
d1bcdc4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue: #
Stacked on #799 (the loop-carried-vector adstack fix); review/merge that first. Base retargets to
mainonce #799 lands.Brief Summary
copilot:summary
Walkthrough
copilot:walkthrough