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
Sebastian Bindgen
pystencils
Commits
74e14a5d
Commit
74e14a5d
authored
Apr 23, 2020
by
Stephan Seitz
Browse files
Skip llvm tests if llvmlite is not installed
parent
e87b4daf
Changes
4
Hide whitespace changes
Inline
Side-by-side
conftest.py
View file @
74e14a5d
...
...
@@ -51,6 +51,7 @@ try:
import
llvmlite
except
ImportError
:
collect_ignore
+=
[
os
.
path
.
join
(
SCRIPT_FOLDER
,
'pystencils_tests/backends/llvm.py'
)]
collect_ignore
+=
[
os
.
path
.
join
(
SCRIPT_FOLDER
,
'pystencils_tests/test_basic_usage_llvm.ipynb'
)]
add_path_to_ignore
(
'pystencils/llvm'
)
try
:
...
...
pystencils_tests/test_jacobi_llvm.py
View file @
74e14a5d
import
numpy
as
np
import
pytest
try
:
from
pystencils.llvm.llvmjit
import
generate_and_jit
from
pystencils.llvm
import
create_kernel
,
make_python_function
from
pystencils.cpu.cpujit
import
get_llc_command
from
pystencils
import
Assignment
,
Field
,
show_code
import
numpy
as
np
except
ModuleNotFoundError
:
pytest
.
importorskip
(
"llvmlite"
)
from
pystencils
import
Assignment
,
Field
,
show_code
from
pystencils.cpu.cpujit
import
get_llc_command
from
pystencils.llvm
import
create_kernel
,
make_python_function
from
pystencils.llvm.llvmjit
import
generate_and_jit
def
test_jacobi_fixed_field_size
():
...
...
pystencils_tests/test_size_and_layout_checks_llvm.py
View file @
74e14a5d
import
numpy
as
np
import
pytest
from
pystencils
import
Assignment
,
Field
from
pystencils.llvm
import
create_kernel
,
make_python_function
try
:
from
pystencils.llvm
import
create_kernel
,
make_python_function
except
ModuleNotFoundError
:
pytest
.
importorskip
(
"llvmlite"
)
def
test_size_check
():
...
...
pystencils_tests/test_sliced_iteration.py
View file @
74e14a5d
...
...
@@ -30,6 +30,8 @@ def test_sliced_iteration():
def
test_sliced_iteration_llvm
():
import
pytest
pytest
.
importorskip
(
"llvmlite"
)
size
=
(
4
,
4
)
src_arr
=
np
.
ones
(
size
)
dst_arr
=
np
.
zeros_like
(
src_arr
)
...
...
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