Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
pystencils-sfg
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
Package registry
Model registry
Operate
Environments
Terraform modules
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-sfg
Commits
6a755913
Commit
6a755913
authored
2 months ago
by
Frederik Hennig
Browse files
Options
Downloads
Patches
Plain Diff
separate failing and non-failing getters for gpu api
parent
e4c257df
No related branches found
No related tags found
1 merge request
!24
Extend Support for CUDA and HIP kernel invocations
Pipeline
#75785
passed
2 months ago
Stage: Code Quality
Stage: Tests
Stage: Documentation
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/pystencilssfg/composer/gpu_composer.py
+8
-3
8 additions, 3 deletions
src/pystencilssfg/composer/gpu_composer.py
with
8 additions
and
3 deletions
src/pystencilssfg/composer/gpu_composer.py
+
8
−
3
View file @
6a755913
...
@@ -85,8 +85,13 @@ class SfgGpuComposer(SfgComposerMixIn):
...
@@ -85,8 +85,13 @@ class SfgGpuComposer(SfgComposerMixIn):
self
.
_gpu_api_provider
=
HipAPI
()
self
.
_gpu_api_provider
=
HipAPI
()
@property
@property
def
gpu_api
(
self
)
->
ProvidesGpuRuntimeAPI
:
def
gpu_api
(
self
)
->
ProvidesGpuRuntimeAPI
|
None
:
"""
GPU runtime API wrapper currently used by this GPU composer.
"""
GPU runtime API wrapper currently used by this GPU composer,
or `None` if none was selected.
"""
return
self
.
_gpu_api_provider
def
get_gpu_api
(
self
)
->
ProvidesGpuRuntimeAPI
:
"""
GPU runtime API provider currently used by this GPU composer.
Raises:
Raises:
AttributeError: If no runtime API was set yet (see `use_cuda`, `use_hip`)
AttributeError: If no runtime API was set yet (see `use_cuda`, `use_hip`)
...
@@ -140,7 +145,7 @@ class SfgGpuComposer(SfgComposerMixIn):
...
@@ -140,7 +145,7 @@ class SfgGpuComposer(SfgComposerMixIn):
launch_config
=
ker
.
get_launch_configuration
()
launch_config
=
ker
.
get_launch_configuration
()
dim3
=
self
.
gpu_api
.
dim3
dim3
=
self
.
get_
gpu_api
()
.
dim3
grid_size
:
ExprLike
grid_size
:
ExprLike
block_size
:
ExprLike
block_size
:
ExprLike
...
...
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