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

use Target.HIP

parent 6a755913
Branches
No related tags found
1 merge request!24Extend Support for CUDA and HIP kernel invocations
Pipeline #75789 failed
......@@ -226,13 +226,12 @@ class SfgGpuKernelInvocation(SfgCallTreeNode):
shared_memory_bytes: SfgStatements | None,
stream: SfgStatements | None,
):
from pystencils import Target
from pystencils.codegen import GpuKernel
kernel = kernel_handle.kernel
if not (isinstance(kernel, GpuKernel) and kernel.target == Target.CUDA):
if not isinstance(kernel, GpuKernel):
raise ValueError(
"An `SfgCudaKernelInvocation` node can only call a CUDA kernel."
"An `SfgGpuKernelInvocation` node can only call GPU kernels."
)
super().__init__()
......
......@@ -14,7 +14,7 @@ with SourceFileGenerator() as sfg:
sfg.use_hip()
sfg.namespace("gen")
base_config = ps.CreateKernelConfig(target=ps.Target.CUDA)
base_config = ps.CreateKernelConfig(target=ps.Target.HIP)
block_size = sfg.gpu_api.dim3().var("blockSize")
grid_size = sfg.gpu_api.dim3().var("gridSize")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment