diff --git a/src/pystencils/backend/kernelcreation/typification.py b/src/pystencils/backend/kernelcreation/typification.py index 3a30c183e720ad7163a43ac2dcb79337307064b9..52888b77b51d657df7db10946c44ed66c0072c53 100644 --- a/src/pystencils/backend/kernelcreation/typification.py +++ b/src/pystencils/backend/kernelcreation/typification.py @@ -448,6 +448,7 @@ class Typifier: case PsSymbolExpr(symb): if symb.dtype is None: symb.dtype = self._ctx.default_dtype + assert isinstance(symb.dtype, PsType) tc.apply_dtype(symb.dtype, expr) case PsConstantExpr(c): diff --git a/src/pystencils/backend/platforms/x86.py b/src/pystencils/backend/platforms/x86.py index 16dbc14c4c077cd16a566ca1f90c42fdafb358d8..6a9dcfd9cfd80bab46de1c27b7ac68a06fad1575 100644 --- a/src/pystencils/backend/platforms/x86.py +++ b/src/pystencils/backend/platforms/x86.py @@ -387,6 +387,7 @@ def _x86_op_intrin( assert target_type == vtype, "type mismatch" assert isinstance(atype, PsVectorType) + assert isinstance(widest_type, PsVectorType) def panic(detail: str = ""): raise MaterializationError( diff --git a/src/pystencils/include/pystencils_runtime/bits/gpu_atomics.h b/src/pystencils/include/pystencils_runtime/bits/gpu_atomics.h index 6de5c3321e1cff84e00cdf7b3c551638ecb2a99e..ff742695ec4fee3118e755e43534e511387b4f1c 100644 --- a/src/pystencils/include/pystencils_runtime/bits/gpu_atomics.h +++ b/src/pystencils/include/pystencils_runtime/bits/gpu_atomics.h @@ -3,8 +3,6 @@ // No direct implementation for all atomic operations available // -> add support by custom implementations using a CAS mechanism -#if defined(__CUDA_ARCH__) || defined(__HIPCC_RTC__) - // - atomicMul (double/float) // see https://stackoverflow.com/questions/43354798/atomic-multiplication-and-division __device__ double atomicMul(double* address, double val) { @@ -31,10 +29,6 @@ __device__ float atomicMul(float* address, float val) { return __int_as_float(old); } -#endif - -#ifdef __CUDA_ARCH__ - // - atomicMin (double/float) // see https://stackoverflow.com/questions/17399119/how-do-i-use-atomicmax-on-floating-point-values-in-cuda __device__ __forceinline__ double atomicMin(double *address, double val) @@ -85,6 +79,4 @@ __device__ __forceinline__ float atomicMax(float *address, float val) break; } return __int_as_float(ret); -} - -#endif \ No newline at end of file +} \ No newline at end of file diff --git a/src/pystencils/sympyextensions/typed_sympy.py b/src/pystencils/sympyextensions/typed_sympy.py index e2435d6bbe570887e0903c67f6041ed9911c02be..3f13ede18b20826d9e26431161ab3276af4b01a4 100644 --- a/src/pystencils/sympyextensions/typed_sympy.py +++ b/src/pystencils/sympyextensions/typed_sympy.py @@ -110,7 +110,7 @@ class TypedSymbol(sp.Symbol): return obj - __xnew__ = staticmethod(__new_stage2__) + __xnew__ = staticmethod(__new_stage2__) # type: ignore __xnew_cached_ = staticmethod(sp.core.cacheit(__new_stage2__)) @property