Skip to content

Remove dace.ndarray class#4

Merged
tbennun merged 13 commits into
masterfrom
remove-dace-ndarray
Nov 4, 2019
Merged

Remove dace.ndarray class#4
tbennun merged 13 commits into
masterfrom
remove-dace-ndarray

Conversation

@tbennun
Copy link
Copy Markdown
Collaborator

@tbennun tbennun commented Nov 3, 2019

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.

@tbennun tbennun requested a review from definelicht November 3, 2019 15:22
@tbennun tbennun merged commit b023943 into master Nov 4, 2019
@tbennun tbennun deleted the remove-dace-ndarray branch November 4, 2019 14:08
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants