Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Sebastian Bindgen
pystencils
Commits
86b97688
Commit
86b97688
authored
Dec 06, 2020
by
Stephan Seitz
Browse files
Merge branch 'InstallBug' into 'master'
FIX pystencils install bug See merge request
pycodegen/pystencils!192
parents
0f0983d6
50d53928
Changes
4
Hide whitespace changes
Inline
Side-by-side
MANIFEST.in
View file @
86b97688
include README.md
include COPYING.txt
include RELEASE-VERSION
global-include *.pyx
global-exclude boundaries/createindexlistcython.c
pystencils_tests/test_vectorization.py
View file @
86b97688
...
...
@@ -42,7 +42,7 @@ def test_inplace_update():
f1
@=
2
*
s
.
tmp0
f2
@=
2
*
s
.
tmp0
ast
=
ps
.
create_kernel
(
update_rule
,
cpu_vectorize_info
=
{
'instruction_set'
:
'avx'
}
)
ast
=
ps
.
create_kernel
(
update_rule
,
cpu_vectorize_info
=
True
)
kernel
=
ast
.
compile
()
kernel
(
f
=
arr
)
np
.
testing
.
assert_equal
(
arr
,
2
)
...
...
pystencils_tests/test_vectorization_specific.py
0 → 100644
View file @
86b97688
import
pytest
import
numpy
as
np
import
sympy
as
sp
import
pystencils
as
ps
from
pystencils.backends.simd_instruction_sets
import
get_supported_instruction_sets
from
pystencils.cpu.vectorization
import
vectorize
from
pystencils.fast_approximation
import
insert_fast_sqrts
,
insert_fast_divisions
from
pystencils.transformations
import
replace_inner_stride_with_one
from
pystencils.backends.simd_instruction_sets
import
get_supported_instruction_sets
supported_instruction_sets
=
get_supported_instruction_sets
()
if
get_supported_instruction_sets
()
else
[]
@
pytest
.
mark
.
parametrize
(
'instruction_set'
,
supported_instruction_sets
)
def
test_vectorisation_varying_arch
(
instruction_set
):
shape
=
(
9
,
9
,
3
)
arr
=
np
.
ones
(
shape
,
order
=
'f'
)
@
ps
.
kernel
def
update_rule
(
s
):
f
=
ps
.
fields
(
"f(3) : [2D]"
,
f
=
arr
)
s
.
tmp0
@=
f
(
0
)
s
.
tmp1
@=
f
(
1
)
s
.
tmp2
@=
f
(
2
)
f0
,
f1
,
f2
=
f
(
0
),
f
(
1
),
f
(
2
)
f0
@=
2
*
s
.
tmp0
f1
@=
2
*
s
.
tmp0
f2
@=
2
*
s
.
tmp0
ast
=
ps
.
create_kernel
(
update_rule
,
cpu_vectorize_info
=
{
'instruction_set'
:
instruction_set
})
kernel
=
ast
.
compile
()
kernel
(
f
=
arr
)
np
.
testing
.
assert_equal
(
arr
,
2
)
setup.py
View file @
86b97688
...
...
@@ -88,7 +88,8 @@ setuptools.setup(name='pystencils',
install_requires
=
[
'sympy>=1.1'
,
'numpy'
,
'appdirs'
,
'joblib'
],
package_data
=
{
'pystencils'
:
[
'include/*.h'
,
'backends/cuda_known_functions.txt'
,
'backends/opencl1.1_known_functions.txt'
]},
'backends/opencl1.1_known_functions.txt'
,
'boundaries/createindexlistcython.pyx'
]},
ext_modules
=
cython_extensions
(
"pystencils.boundaries.createindexlistcython"
)
if
USE_CYTHON
else
[],
classifiers
=
[
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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