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

fix sycl function translation

parent 10df2868
No related branches found
No related tags found
1 merge request!384Fundamental GPU Support
Pipeline #65946 passed
......@@ -36,6 +36,7 @@ class SyclPlatform(Platform):
self, math_function: PsMathFunction, dtype: PsType
) -> CFunction:
func = math_function.func
arg_types = (dtype,) * func.num_args
if isinstance(dtype, PsIeeeFloatType) and dtype.width in (16, 32, 64):
match func:
case (
......@@ -45,9 +46,9 @@ class SyclPlatform(Platform):
| MathFunctions.Tan
| MathFunctions.Pow
):
return CFunction(f"sycl::{func.function_name}", func.num_args)
return CFunction(f"sycl::{func.function_name}", arg_types, dtype)
case MathFunctions.Abs | MathFunctions.Min | MathFunctions.Max:
return CFunction(f"sycl::f{func.function_name}", func.num_args)
return CFunction(f"sycl::f{func.function_name}", arg_types, dtype)
raise MaterializationError(
f"No implementation available for function {math_function} on data type {dtype}"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment