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
pycodegen
pystencils
Commits
946f812d
Commit
946f812d
authored
5 years ago
by
Stephan Seitz
Browse files
Options
Downloads
Patches
Plain Diff
Differentiate between llvm and llvm_gpu
parent
b23348ce
No related branches found
No related tags found
1 merge request
!53
Compile CUDA using the LLVM backend
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pystencils/llvm/kernelcreation.py
+2
-1
2 additions, 1 deletion
pystencils/llvm/kernelcreation.py
with
2 additions
and
1 deletion
pystencils/llvm/kernelcreation.py
+
2
−
1
View file @
946f812d
...
@@ -28,6 +28,7 @@ def create_kernel(assignments, function_name="kernel", type_info=None, split_gro
...
@@ -28,6 +28,7 @@ def create_kernel(assignments, function_name="kernel", type_info=None, split_gro
if
target
==
'
cpu
'
:
if
target
==
'
cpu
'
:
from
pystencils.cpu
import
create_kernel
from
pystencils.cpu
import
create_kernel
code
=
create_kernel
(
assignments
,
function_name
,
type_info
,
split_groups
,
iteration_slice
,
ghost_layers
)
code
=
create_kernel
(
assignments
,
function_name
,
type_info
,
split_groups
,
iteration_slice
,
ghost_layers
)
code
.
_backend
=
'
llvm
'
elif
target
==
'
gpu
'
:
elif
target
==
'
gpu
'
:
from
pystencils.gpucuda.kernelcreation
import
create_cuda_kernel
from
pystencils.gpucuda.kernelcreation
import
create_cuda_kernel
code
=
create_cuda_kernel
(
assignments
,
code
=
create_cuda_kernel
(
assignments
,
...
@@ -35,10 +36,10 @@ def create_kernel(assignments, function_name="kernel", type_info=None, split_gro
...
@@ -35,10 +36,10 @@ def create_kernel(assignments, function_name="kernel", type_info=None, split_gro
type_info
,
type_info
,
iteration_slice
=
iteration_slice
,
iteration_slice
=
iteration_slice
,
ghost_layers
=
ghost_layers
)
ghost_layers
=
ghost_layers
)
code
.
_backend
=
'
llvm_gpu
'
else
:
else
:
NotImplementedError
()
NotImplementedError
()
code
.
body
=
insert_casts
(
code
.
body
)
code
.
body
=
insert_casts
(
code
.
body
)
code
.
_compile_function
=
make_python_function
code
.
_compile_function
=
make_python_function
code
.
_backend
=
'
llvm
'
return
code
return
code
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