diff --git a/hog/operator_generation/indexing.py b/hog/operator_generation/indexing.py index caa81a72dd4ada2ae193bd0373e7251da7a90f86..7db2fd7e4667b1deb6abb7970539f3155b7cfc65 100644 --- a/hog/operator_generation/indexing.py +++ b/hog/operator_generation/indexing.py @@ -19,9 +19,9 @@ import operator import sympy as sp from typing import Any, List, Tuple, Union -from pystencils import TypedSymbol +from pystencils import tcast, TypedSymbol from pystencils.sympyextensions.integer_functions import int_div -from pystencils.sympyextensions.typed_sympy import CastFunc, DynamicType +from pystencils.sympyextensions.typed_sympy import DynamicType from pystencils.backend.kernelcreation import KernelCreationContext from pystencils.types.quick import UInt @@ -740,7 +740,7 @@ def element_vertex_coordinates( for vertex_index in vertex_indices: vertex_coordinate = macro_vertex_coordinates[0] for i in range(geometry.dimensions): - vertex_coordinate += steps[i] * CastFunc( + vertex_coordinate += steps[i] * tcast( vertex_index.primitive_index[i], DynamicType.NUMERIC_TYPE ) vertex_coordinates.append(vertex_coordinate) diff --git a/hog/operator_generation/optimizer.py b/hog/operator_generation/optimizer.py index 64ae52f496adcecaff24818f6f789a2397fa23b2..644b961d88ac7887fa4b2a8e6c19e0653667a177 100644 --- a/hog/operator_generation/optimizer.py +++ b/hog/operator_generation/optimizer.py @@ -39,7 +39,7 @@ from pystencils.backend.transformations import ( ReshapeLoops, SelectIntrinsics, ) -from pystencils.codegen.config import VectorizationConfig +from pystencils.codegen.config import VectorizationOptions from pystencils.codegen.target import Target from pystencils.defaults import DEFAULTS from pystencils.types import PsScalarType @@ -240,7 +240,7 @@ class Optimizer: desc = "avx512" if self[Opts.VECTORIZE512] else "avx" platform = platforms.X86VectorCpu(ctx, arch) - lanes = VectorizationConfig.default_lanes( + lanes = VectorizationOptions.default_lanes( target, cast(PsScalarType, ctx.default_dtype) ) vectorizer = LoopVectorizer(ctx, lanes) diff --git a/pyproject.toml b/pyproject.toml index 2ceea140ffe053a1ba2d46842078de42d1a8565a..5ccd29eecd42a938d919c6f8cfb71236e047976f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ dependencies = [ "numpy==1.24.3", "quadpy-gpl==0.16.10", "poly-cse-py", - "pystencils @ git+https://i10git.cs.fau.de/pycodegen/pystencils.git@4f8e42e6c2866dce3f1244c41ecdf45db896ec61", + "pystencils @ git+https://i10git.cs.fau.de/pycodegen/pystencils.git@3b9860fb6ad67288c264ba7a74d5629e88107948", "pytest==7.3.1", "sympy==1.11.1", "tabulate==0.9.0", diff --git a/requirements.txt b/requirements.txt index ef70266f101448e6fb27deee76a51cc96656e1d4..201174885e3e1f6d37b288aa823ef2b597ebefb1 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,7 +4,7 @@ islpy ndim @ https://github.com/sigma-py/ndim/archive/refs/tags/v0.1.6.tar.gz numpy==1.24.3 poly-cse-py -pystencils @ git+https://i10git.cs.fau.de/pycodegen/pystencils.git@4f8e42e6c2866dce3f1244c41ecdf45db896ec61 +pystencils @ git+https://i10git.cs.fau.de/pycodegen/pystencils.git@3b9860fb6ad67288c264ba7a74d5629e88107948 pytest==7.3.1 sympy==1.11.1 tabulate==0.9.0