Remove dace.ndarray class#4
Merged
Merged
Conversation
definelicht
approved these changes
Nov 4, 2019
ThrudPrimrose
added a commit
that referenced
this pull request
May 20, 2026
validate_state's dimensionality-mismatch check dereferenced sdfg.arrays[src_node.data].veclen / sdfg.arrays[dst_node.data].veclen on every edge with other_subset set, assuming both endpoints were AccessNodes. Any edge whose src/dst is a NestedSDFG / MapEntry / MapExit / ConsumeEntry / ConsumeExit raised "AttributeError: 'NestedSDFG' object has no attribute 'data'" because scope nodes do not expose .data -- they route data via connectors, and any per-side packing lives on the inner descriptor. The crash blocked a 2nd/3rd canonicalize() call on the guarded imperfect-nest repro (a top-level guard above an outer map with a nested map and an extra-statement tail): the multi-pass pipeline eventually produces a deeper NSDFG whose inner NSDFG -> MapExit edge carries both src_subset and dst_subset, and validation aborts before the pipeline can reach a fixed point. Fix: read each side's veclen only when its endpoint is an AccessNode; default to 1 for scope nodes. The two View-exception branches had the same latent assumption -- guarded them with the same isinstance check. Closes the canonicalize idempotence crash: with this guard the repro reaches a stable fixed point (1x->(1,2), 2x=3x=4x=(2,2)) with no warnings, and the original "_it_X leaks into outer subsets" path is unaffected (those forms were the intentional WCR running-union encoding from PR #1176 -- the iterator IS in scope on the inner-out edge, so the SDFG is well-formed; the only thing missing was a validator that survives non-AccessNode endpoints). CORE_BUGFIXES.md: mark #3 (preserve_minima fabrication) as NOT-A-BUG (intentional WCR semantics); mark #4 (canonicalize idempotence) as RESOLVED by this fix; add #9 describing the validation guard with the sweep verification. Sweep: tests/transformations + tests/canonicalize + propagation + tests/passes -- 2074 passed, 25 failed (all pre-existing: 5 offset_loop_and_maps TODO-raise, 1 perf_loop_nesting refusal, 1 branch_elimination test-bug, plus environmental cache/import errors). One fewer failure than baseline (the canonicalize idem path now survives validation). Zero net regressions.
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.
This PR removes the dace ndarray class in favor of a wrapper function that creates a numpy ndarray.
This will allow us to remove static class variables in Symbol later on.