You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, validation does not check whether the symbolic subset expressions of memlets don't contain array accesses. Such a case is invalid and should throw a validation error. See this testcase:
deftest_memlet_subset_validation_bug():
sdfg=dace.SDFG("test")
sdfg.add_array("A", shape=(5, ), dtype=dace.int32)
sdfg.add_array("B", shape=(5, ), dtype=dace.int32)
sdfg.add_array("indirection", shape=(5, ), dtype=dace.int32)
state=sdfg.add_state("start", is_start_state=True)
access_A=state.add_access("A")
access_B=state.add_access("B")
memlet=state.add_edge(access_A, "A", access_B, None, dace.Memlet("A[0]"))
# This is invalid SDFG as we are not allowed to use other arrays as subset expressions!memlet.data.subset=subsets.Range([("indirection[0]", "indirection[0]", "1")])
# FIXME: we don't seem to have an appropriate type for memlet errors?withpytest.raises(Exception):
sdfg.validate()
# This must also work if the array is doesn't existmemlet.data.subset=subsets.Range([("undeclared_array[0]", "undeclared_array[0]", "1")])
# FIXME: we don't seem to have an appropriate type for memlet errors?withpytest.raises(Exception):
sdfg.validate()
Currently, validation does not check whether the symbolic subset expressions of memlets don't contain array accesses. Such a case is invalid and should throw a validation error. See this testcase:
The full testcase is available here: https://github.com/BenWeber42/dace/blob/060d873a7609633752b6f3bf3f7687b1b6d51506/tests/memlet_subset_validation_bug_test.py
The text was updated successfully, but these errors were encountered: