From 10def05e256d2c316f5063e48bbbfebe2c84ea85 Mon Sep 17 00:00:00 2001 From: zy69guqi <richard.angersbach@fau.de> Date: Thu, 30 Jan 2025 19:59:46 +0100 Subject: [PATCH] Fix typecheck --- src/pystencils/backend/platforms/cuda.py | 2 +- src/pystencils/backend/platforms/sycl.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/pystencils/backend/platforms/cuda.py b/src/pystencils/backend/platforms/cuda.py index 95480de93..bf5b91b82 100644 --- a/src/pystencils/backend/platforms/cuda.py +++ b/src/pystencils/backend/platforms/cuda.py @@ -156,7 +156,7 @@ class CudaPlatform(GenericGpu): assert isinstance(symbol_expr, PsSymbolExpr) and isinstance(symbol_expr.dtype, PsScalarType) call.function = CFunction(f"atomic{op.name}", [ptr_expr.dtype, symbol_expr.dtype], PsCustomType("void")) - call.args = [ptr_expr, symbol_expr] + call.args = (ptr_expr, symbol_expr) if not isinstance(symbol_expr.dtype, PsIeeeFloatType) or symbol_expr.dtype.width not in (32, 64): NotImplementedError("atomicMul is only available for float32/64 datatypes") diff --git a/src/pystencils/backend/platforms/sycl.py b/src/pystencils/backend/platforms/sycl.py index dd38aeb48..2ea2934f3 100644 --- a/src/pystencils/backend/platforms/sycl.py +++ b/src/pystencils/backend/platforms/sycl.py @@ -112,7 +112,9 @@ class SyclPlatform(GenericGpu): def unfold_function( self, call: PsCall ) -> PsAstNode: - pass + raise MaterializationError( + f"No implementation available for function {call.function.name}" + ) def _prepend_dense_translation( self, body: PsBlock, ispace: FullIterationSpace -- GitLab