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
Markus Holzer
pystencils
Commits
777bdfaa
Commit
777bdfaa
authored
3 years ago
by
Markus Holzer
Browse files
Options
Downloads
Patches
Plain Diff
test
parent
4424dfd3
No related branches found
No related tags found
No related merge requests found
Pipeline
#37520
failed
3 years ago
Stage: pretest
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
conftest.py
+0
-4
0 additions, 4 deletions
conftest.py
pystencils_tests/test_vectorization_specific.py
+3
-3
3 additions, 3 deletions
pystencils_tests/test_vectorization_specific.py
with
3 additions
and
7 deletions
conftest.py
+
0
−
4
View file @
777bdfaa
...
...
@@ -82,10 +82,6 @@ try:
except
ImportError
:
collect_ignore
+=
[
os
.
path
.
join
(
SCRIPT_FOLDER
,
"
pystencils/datahandling/vtk.py
"
)]
# TODO: Remove if Ubuntu 18.04 is no longer supported
if
pytest_version
<
50403
:
collect_ignore
+=
[
os
.
path
.
join
(
SCRIPT_FOLDER
,
"
pystencils_tests/test_jupyter_extensions.ipynb
"
)]
collect_ignore
+=
[
os
.
path
.
join
(
SCRIPT_FOLDER
,
'
setup.py
'
)]
for
root
,
sub_dirs
,
files
in
os
.
walk
(
'
.
'
):
...
...
This diff is collapsed.
Click to expand it.
pystencils_tests/test_vectorization_specific.py
+
3
−
3
View file @
777bdfaa
...
...
@@ -63,7 +63,7 @@ def test_vectorized_abs(instruction_set, dtype):
def
test_strided
(
instruction_set
,
dtype
):
npdtype
=
np
.
float64
if
dtype
==
'
double
'
else
np
.
float32
type_string
=
"
float64
"
if
dtype
==
'
double
'
else
"
float32
"
f
,
g
=
ps
.
fields
(
f
"
f, g :
{
type_string
}
[2D]
"
)
update_rule
=
[
ps
.
Assignment
(
g
[
0
,
0
],
f
[
0
,
0
]
+
f
[
-
1
,
0
]
+
f
[
1
,
0
]
+
f
[
0
,
1
]
+
f
[
0
,
-
1
]
+
42.0
)]
if
'
storeS
'
not
in
get_vector_instruction_set
(
dtype
,
instruction_set
)
and
instruction_set
not
in
[
'
avx512
'
,
'
rvv
'
]
and
not
instruction_set
.
startswith
(
'
sve
'
):
...
...
@@ -79,7 +79,7 @@ def test_strided(instruction_set, dtype):
ast
=
ps
.
create_kernel
(
update_rule
,
config
=
config
)
assert
len
(
warn
)
==
0
ps
.
show_code
(
ast
)
#
ps.show_code(ast)
func
=
ast
.
compile
()
ref_config
=
pystencils
.
config
.
CreateKernelConfig
(
default_number_float
=
type_string
)
ref_func
=
ps
.
create_kernel
(
update_rule
,
config
=
ref_config
).
compile
()
...
...
@@ -92,7 +92,7 @@ def test_strided(instruction_set, dtype):
func
(
g
=
dst
,
f
=
arr
)
ref_func
(
g
=
ref
,
f
=
arr
)
np
.
testing
.
assert_almost_equal
(
dst
,
ref
,
13
if
dtype
==
'
double
'
else
5
)
np
.
testing
.
assert_almost_equal
(
dst
[
1
:
-
1
,
1
:
-
1
],
ref
[
1
:
-
1
,
1
:
-
1
]
,
13
if
dtype
==
'
double
'
else
5
)
@pytest.mark.parametrize
(
'
dtype
'
,
(
'
float
'
,
'
double
'
))
...
...
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