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

Merge branch 'v2.0-dev' into fhennig/codegen-module

parents 684eb58c d4e17c8f
No related branches found
No related tags found
1 merge request!433Consolidate codegen and JIT modules.
Pipeline #70877 passed
...@@ -122,6 +122,11 @@ class CudaPlatform(GenericGpu): ...@@ -122,6 +122,11 @@ class CudaPlatform(GenericGpu):
case MathFunctions.Abs if dtype.width == 16: case MathFunctions.Abs if dtype.width == 16:
cfunc = CFunction(" __habs", arg_types, dtype) cfunc = CFunction(" __habs", arg_types, dtype)
case _:
raise MaterializationError(
f"Cannot materialize call to function {func}"
)
call.function = cfunc call.function = cfunc
return call return call
......
...@@ -19,7 +19,7 @@ if TYPE_CHECKING: ...@@ -19,7 +19,7 @@ if TYPE_CHECKING:
class GenericGpu(Platform): class GenericGpu(Platform):
@abstractmethod @abstractmethod
def materialize_iteration_space( def materialize_iteration_space(
self, block: PsBlock, ispace: IterationSpace self, body: PsBlock, ispace: IterationSpace
) -> tuple[PsBlock, GpuThreadsRange | None]: ) -> tuple[PsBlock, GpuThreadsRange | None]:
pass pass
......
...@@ -27,7 +27,7 @@ class Platform(ABC): ...@@ -27,7 +27,7 @@ class Platform(ABC):
@abstractmethod @abstractmethod
def materialize_iteration_space( def materialize_iteration_space(
self, block: PsBlock, ispace: IterationSpace self, body: PsBlock, ispace: IterationSpace
) -> PsBlock | tuple[PsBlock, Any]: ) -> PsBlock | tuple[PsBlock, Any]:
pass pass
......
...@@ -7,7 +7,6 @@ from pystencils.backend.ast import dfs_preorder ...@@ -7,7 +7,6 @@ from pystencils.backend.ast import dfs_preorder
from pystencils.backend.ast.expressions import PsCall from pystencils.backend.ast.expressions import PsCall
def unary_function(name, xp): def unary_function(name, xp):
return { return {
"exp": (sp.exp, xp.exp), "exp": (sp.exp, xp.exp),
......
...@@ -62,6 +62,8 @@ def test_sliced_iteration(): ...@@ -62,6 +62,8 @@ def test_sliced_iteration():
make_slice[3, 2:-2], make_slice[3, 2:-2],
make_slice[2:-2:2, ::3], make_slice[2:-2:2, ::3],
make_slice[10:, :-5:2], make_slice[10:, :-5:2],
make_slice[-5:-1, -1],
make_slice[-3, -1]
], ],
) )
def test_numerical_slices(gen_config: CreateKernelConfig, xp, islice): def test_numerical_slices(gen_config: CreateKernelConfig, xp, islice):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment