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
Stephan Seitz
pystencils
Commits
9bd38c55
Commit
9bd38c55
authored
5 years ago
by
Stephan Seitz
Browse files
Options
Downloads
Patches
Plain Diff
Add opencl1.1_known_functions.txt
parent
ecb1614f
No related branches found
No related tags found
No related merge requests found
Pipeline
#17247
passed
5 years ago
Stage: test
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
pystencils/backends/opencl1.1_known_functions.txt
+100
-0
100 additions, 0 deletions
pystencils/backends/opencl1.1_known_functions.txt
pystencils/backends/opencl_backend.py
+10
-0
10 additions, 0 deletions
pystencils/backends/opencl_backend.py
setup.py
+4
-1
4 additions, 1 deletion
setup.py
with
114 additions
and
1 deletion
pystencils/backends/opencl1.1_known_functions.txt
0 → 100644
+
100
−
0
View file @
9bd38c55
acos
acosh
acospi
asin
asinh
asinpi
atan
atan2
atanh
atanpi
atan2pi
cbrt
ceil
copysign
cos
cosh
cospi
erfc
erf
exp
exp2
exp10
expm1
fabs
fdim
floor
fma
fmax
fmax
fmin45
fmin
fmod
fract
frexp
hypot
ilogb
ldexp
lgamma
lgamma_r
log
log2
log10
log1p
logb
mad
maxmag
minmag
modf
nextafter
pow
pown
powr
remquo
intn
remquo
rint
rootn
rootn
round
rsqrt
sin
sincos
sinh
sinpi
sqrt
tan
tanh
tanpi
tgamma
trunc
half_cos
half_divide
half_exp
half_exp2
half_exp10
half_log
half_log2
half_log10
half_powr
half_recip
half_rsqrt
half_sin
half_sqrt
half_tan
native_cos
native_divide
native_exp
native_exp2
native_exp10
native_log
native_log2
native_log10
native_powr
native_recip
native_rsqrt
native_sin
native_sqrt
native_tan
This diff is collapsed.
Click to expand it.
pystencils/backends/opencl_backend.py
+
10
−
0
View file @
9bd38c55
from
os.path
import
dirname
,
join
import
pystencils.data_types
from
pystencils.astnodes
import
Node
from
pystencils.backends.cbackend
import
CustomSympyPrinter
,
generate_c
from
pystencils.backends.cuda_backend
import
CudaBackend
,
CudaSympyPrinter
from
pystencils.fast_approximation
import
fast_division
,
fast_inv_sqrt
,
fast_sqrt
with
open
(
join
(
dirname
(
__file__
),
'
opencl1.1_known_functions.txt
'
))
as
f
:
lines
=
f
.
readlines
()
OPENCL_KNOWN_FUNCTIONS
=
{
l
.
strip
():
l
.
strip
()
for
l
in
lines
if
l
}
def
generate_opencl
(
astnode
:
Node
,
signature_only
:
bool
=
False
)
->
str
:
"""
Prints an abstract syntax tree node as CUDA code.
...
...
@@ -58,6 +64,10 @@ class OpenClSympyPrinter(CudaSympyPrinter):
'
gridDim
'
:
'
get_global_size
'
}
def
__init__
(
self
):
CustomSympyPrinter
.
__init__
(
self
)
self
.
known_functions
=
OPENCL_KNOWN_FUNCTIONS
def
_print_ThreadIndexingSymbol
(
self
,
node
):
symbol_name
:
str
=
node
.
name
function_name
,
dimension
=
tuple
(
symbol_name
.
split
(
"
.
"
))
...
...
This diff is collapsed.
Click to expand it.
setup.py
+
4
−
1
View file @
9bd38c55
...
...
@@ -88,7 +88,10 @@ setup(name='pystencils',
url
=
'
https://i10git.cs.fau.de/pycodegen/pystencils/
'
,
packages
=
[
'
pystencils
'
]
+
[
'
pystencils.
'
+
s
for
s
in
find_packages
(
'
pystencils
'
)],
install_requires
=
[
'
sympy>=1.1
'
,
'
numpy
'
,
'
appdirs
'
,
'
joblib
'
],
package_data
=
{
'
pystencils
'
:
[
'
include/*.h
'
,
'
backends/cuda_known_functions.txt
'
]},
package_data
=
{
'
pystencils
'
:
[
'
include/*.h
'
,
'
backends/cuda_known_functions.txt
'
,
'
backends/opencl1.1_known_functions.txt
'
]},
ext_modules
=
cython_extensions
(
"
pystencils.boundaries.createindexlistcython
"
),
classifiers
=
[
'
Development Status :: 4 - Beta
'
,
...
...
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