Skip to content

Commit

Permalink
Address comments iree-org#2
Browse files Browse the repository at this point in the history
Signed-off-by: Harsh Menon <harsh@nod-labs.com>
  • Loading branch information
harsh-nod committed Aug 27, 2024
1 parent 403075d commit 3f833c2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion shark_turbine/kernel/wave/index_sequence_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,12 @@ def has_strided_access(node: fx.Node) -> bool:
custom = get_custom(node)
if isinstance(custom, Write) and len(custom.type.symbolic_shape) == 2:
strides = [simplify_index(custom.index[dim]).stride for dim in custom.index]
return sum(1 for stride in strides if stride > 1) == 1
num_strided_accesses = sum(1 for stride in strides if stride > 1)
if num_strided_accesses > 1:
raise NotImplementedError(
"Support for strided accesses on more than one dimension not implemented yet!"
)
return num_strided_accesses == 1
return False

strided_operators = trace.walk(has_strided_access)
Expand Down

0 comments on commit 3f833c2

Please sign in to comment.