Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Tom Harke
pystencils
Commits
e9605ab2
Commit
e9605ab2
authored
Oct 18, 2019
by
Stephan Seitz
Browse files
Skip OpenCL tests that require pycuda if pycuda is not installed
parent
12459396
Changes
1
Hide whitespace changes
Inline
Side-by-side
pystencils_tests/test_opencl.py
View file @
e9605ab2
...
...
@@ -40,6 +40,8 @@ def test_print_opencl():
@
pytest
.
mark
.
skipif
(
not
HAS_OPENCL
,
reason
=
"Test requires pyopencl"
)
def
test_opencl_jit_fixed_size
():
pytest
.
importorskip
(
'pycuda'
)
z
,
y
,
x
=
pystencils
.
fields
(
"z, y, x: [20,30]"
)
assignments
=
pystencils
.
AssignmentCollection
({
...
...
@@ -92,6 +94,8 @@ def test_opencl_jit_fixed_size():
@
pytest
.
mark
.
skipif
(
not
HAS_OPENCL
,
reason
=
"Test requires pyopencl"
)
def
test_opencl_jit
():
pytest
.
importorskip
(
'pycuda'
)
z
,
y
,
x
=
pystencils
.
fields
(
"z, y, x: [2d]"
)
assignments
=
pystencils
.
AssignmentCollection
({
...
...
@@ -144,6 +148,8 @@ def test_opencl_jit():
@
pytest
.
mark
.
skipif
(
not
HAS_OPENCL
,
reason
=
"Test requires pyopencl"
)
def
test_opencl_jit_with_parameter
():
pytest
.
importorskip
(
'pycuda'
)
z
,
y
,
x
=
pystencils
.
fields
(
"z, y, x: [2d]"
)
a
=
sp
.
Symbol
(
'a'
)
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment