Skip to content
Snippets Groups Projects
Commit 6a755913 authored by Frederik Hennig's avatar Frederik Hennig
Browse files

separate failing and non-failing getters for gpu api

parent e4c257df
No related branches found
No related tags found
1 merge request!24Extend Support for CUDA and HIP kernel invocations
Pipeline #75785 passed
...@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment