diff --git a/pystencils/backends/cbackend.py b/pystencils/backends/cbackend.py index 335449a4b6cbec1e00ab01748d02232f2b94a0b8..a17ee7269bbb01aef673dc22c6432698d0c3cd5b 100644 --- a/pystencils/backends/cbackend.py +++ b/pystencils/backends/cbackend.py @@ -47,7 +47,7 @@ def generate_c(ast_node: Node, Args: ast_node: ast representation of kernel signature_only: generate signature without function body - dialect: `Backend`: 'C', 'CUDA' or 'OPENCL' + dialect: `Backend`: 'C' or 'CUDA' custom_backend: use own custom printer for code generation with_globals: enable usage of global variables Returns: diff --git a/pystencils/kernelcreation.py b/pystencils/kernelcreation.py index c4f22de7a19d4aada331c9a28881322d2078f0b8..98095151f7880417bd085aa20ab7c121711f70ab 100644 --- a/pystencils/kernelcreation.py +++ b/pystencils/kernelcreation.py @@ -127,8 +127,6 @@ class CreateKernelConfig: self.backend = Backend.C elif self.target == Target.GPU: self.backend = Backend.CUDA - elif self.target == Target.OPENCL: - self.backend = Backend.OPENCL else: raise NotImplementedError(f'Target {self.target} has no default backend') diff --git a/pystencils/rng.py b/pystencils/rng.py index 513792a9631d7a4bb585d63a4eb481fcd241871a..863867bfed56a8dd4bc3192148fe510c32160109 100644 --- a/pystencils/rng.py +++ b/pystencils/rng.py @@ -54,8 +54,7 @@ class RNGBase(CustomCodeNode): else: code += f"{vector_instruction_set[r.dtype.base_name] if vector_instruction_set else r.dtype} " + \ f"{r.name};\n" - args = [print_arg(a) for a in self.args] + \ - [('&' if dialect == Backend.OPENCL else '') + r.name for r in self.result_symbols] + args = [print_arg(a) for a in self.args] + ['' + r.name for r in self.result_symbols] code += (self._name + "(" + ", ".join(args) + ");\n") return code diff --git a/pystencils_tests/test_create_kernel_config.py b/pystencils_tests/test_create_kernel_config.py index 836569a9382626b808a1bfb9f75c94ba3722e9ac..86a1c0ca8b2d726e3a5cb1681800842d9c1a0408 100644 --- a/pystencils_tests/test_create_kernel_config.py +++ b/pystencils_tests/test_create_kernel_config.py @@ -10,9 +10,6 @@ def test_create_kernel_config(): c = ps.CreateKernelConfig(target=ps.Target.GPU) assert c.backend == ps.Backend.CUDA - c = ps.CreateKernelConfig(target=ps.Target.OPENCL) - assert c.backend == ps.Backend.OPENCL - c = ps.CreateKernelConfig(backend=ps.Backend.CUDA) assert c.target == ps.Target.CPU assert c.backend == ps.Backend.CUDA diff --git a/pystencils_tests/test_datahandling.py b/pystencils_tests/test_datahandling.py index 2a7fe233bd36be2273776f73a36e81760f1274df..f160f5f59a1556e3ebb6efb1844f7b23c2632c56 100644 --- a/pystencils_tests/test_datahandling.py +++ b/pystencils_tests/test_datahandling.py @@ -116,7 +116,7 @@ def synchronization(dh, test_gpu=False): def kernel_execution_jacobi(dh, target): - test_gpu = target == Target.GPU or target == Target.OPENCL + test_gpu = target == Target.GPU dh.add_array('f', gpu=test_gpu) dh.add_array('tmp', gpu=test_gpu)