Skip to content
Snippets Groups Projects
Commit c31d4074 authored by Richard Angersbach's avatar Richard Angersbach
Browse files

Try fixing required headers for cuda and hip for reductions

parent 6a6e57f0
1 merge request!438Reduction Support
Pipeline #76878 failed with stages
in 12 minutes and 22 seconds
......@@ -8,6 +8,4 @@ class CudaPlatform(GenericGpu):
@property
def required_headers(self) -> set[str]:
return {
'"gpu_atomics.h"',
}
return super().required_headers
......@@ -198,6 +198,14 @@ class GenericGpu(Platform):
thread_mapping: Callback object which defines the mapping of thread indices onto iteration space points
"""
@property
@abstractmethod
def required_headers(self) -> set[str]:
return {
'"gpu_atomics.h"',
"<cmath>",
}
def __init__(
self,
ctx: KernelCreationContext,
......@@ -365,9 +373,9 @@ class GenericGpu(Platform):
match func:
case NumericLimitsFunctions.Min:
define = "NEG_INFINITY"
define = "-INFINITY"
case NumericLimitsFunctions.Max:
define = "POS_INFINITY"
define = "INFINITY"
case _:
raise MaterializationError(
f"Cannot materialize call to function {func}"
......
......@@ -8,7 +8,6 @@ class HipPlatform(GenericGpu):
@property
def required_headers(self) -> set[str]:
return {
'"gpu_atomics.h"',
return super().required_headers | {
'"pystencils_runtime/hip.h"',
}
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment