Skip to content

Commit

Permalink
More informative message when using explicit tasklets with wrong dime…
Browse files Browse the repository at this point in the history
…nsionality
  • Loading branch information
tbennun committed Sep 5, 2023
1 parent 171ddca commit 2adc2e5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion dace/frontend/python/memlet_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,11 @@ def ParseMemlet(visitor,
if len(node.value.args) >= 2:
write_conflict_resolution = node.value.args[1]

subset, new_axes, arrdims = parse_memlet_subset(array, node, das, parsed_slice)
try:
subset, new_axes, arrdims = parse_memlet_subset(array, node, das, parsed_slice)
except IndexError:
raise DaceSyntaxError(visitor, node, 'Failed to parse memlet expression due to dimensionality. '
f'Array dimensions: {array.shape}, expression in code: {astutils.unparse(node)}')

# If undefined, default number of accesses is the slice size
if num_accesses is None:
Expand Down

0 comments on commit 2adc2e5

Please sign in to comment.