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

Add guard for INFINITY numeric limit macro used by cuda backend

parent 4edb0f97
No related branches found
No related tags found
1 merge request!438Reduction Support
Pipeline #73828 failed
...@@ -90,8 +90,7 @@ class CudaPlatform(GenericGpu): ...@@ -90,8 +90,7 @@ class CudaPlatform(GenericGpu):
assert isinstance(dtype, PsIeeeFloatType) assert isinstance(dtype, PsIeeeFloatType)
defines = { NumericLimitsFunctions.Min: "NEG_INFINITY", NumericLimitsFunctions.Max: "POS_INFINITY" } defines = { NumericLimitsFunctions.Min: "NEG_INFINITY", NumericLimitsFunctions.Max: "POS_INFINITY" }
return PsLiteralExpr( return PsLiteralExpr(PsLiteral(defines[func], dtype))
PsLiteral(defines[func.function_name], dtype))
if isinstance(dtype, PsIeeeFloatType): if isinstance(dtype, PsIeeeFloatType):
match func: match func:
......
#pragma once #pragma once
#define POS_INFINITY __int_as_float(0x7f800000) #define POS_INFINITY __int_as_float(0x7f800000)
#define INFINITY POS_INFINITY
#define NEG_INFINITY __int_as_float(0xff800000) #define NEG_INFINITY __int_as_float(0xff800000)
#ifndef INFINITY
#define INFINITY POS_INFINITY
#endif
#ifdef __HIPCC_RTC__ #ifdef __HIPCC_RTC__
typedef __hip_uint8_t uint8_t; typedef __hip_uint8_t uint8_t;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment