Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
pystencils
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pycodegen
pystencils
Commits
15fea042
Commit
15fea042
authored
1 year ago
by
Markus Holzer
Browse files
Options
Downloads
Patches
Plain Diff
Added error message
parent
24193b84
No related branches found
No related tags found
1 merge request
!351
[FIX] Alignement detection
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pystencils/cpu/vectorization.py
+5
-0
5 additions, 0 deletions
pystencils/cpu/vectorization.py
with
5 additions
and
0 deletions
pystencils/cpu/vectorization.py
+
5
−
0
View file @
15fea042
...
@@ -178,6 +178,11 @@ def vectorize_inner_loops_and_adapt_load_stores(ast_node, assume_aligned, nontem
...
@@ -178,6 +178,11 @@ def vectorize_inner_loops_and_adapt_load_stores(ast_node, assume_aligned, nontem
for
indexed
in
loop_node
.
atoms
(
sp
.
Indexed
):
for
indexed
in
loop_node
.
atoms
(
sp
.
Indexed
):
base
,
index
=
indexed
.
args
base
,
index
=
indexed
.
args
if
loop_counter_symbol
in
index
.
atoms
(
sp
.
Symbol
):
if
loop_counter_symbol
in
index
.
atoms
(
sp
.
Symbol
):
if
not
isinstance
(
vector_width
,
int
):
error_message
=
"
NotImplemented: For instruction sets with variable vector size the aligned and
"
\
"
unaligned load and strore instructions must match.
"
assert
ast_node
.
instruction_set
[
'
loadA
'
]
==
ast_node
.
instruction_set
[
'
loadU
'
],
error_message
assert
ast_node
.
instruction_set
[
'
storeU
'
]
==
ast_node
.
instruction_set
[
'
storeA
'
],
error_message
loop_counter_is_offset
=
loop_counter_symbol
not
in
(
index
-
loop_counter_symbol
).
atoms
()
loop_counter_is_offset
=
loop_counter_symbol
not
in
(
index
-
loop_counter_symbol
).
atoms
()
aligned_access
=
(
index
-
loop_counter_symbol
).
subs
(
zero_loop_counters
)
%
vector_width
==
0
aligned_access
=
(
index
-
loop_counter_symbol
).
subs
(
zero_loop_counters
)
%
vector_width
==
0
stride
=
sp
.
simplify
(
index
.
subs
({
loop_counter_symbol
:
loop_counter_symbol
+
1
})
-
index
)
stride
=
sp
.
simplify
(
index
.
subs
({
loop_counter_symbol
:
loop_counter_symbol
+
1
})
-
index
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment