This patch prepares for the new AMDGPU NextGen plugin.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
If something has a simple uncontroversial fix, it's fine to just push it directly without review. Usually easier than reverting a whole patch.
openmp/libomptarget/plugins/amdgpu/dynamic_hsa/hsa.h | ||
---|---|---|
306 | Is there a reason this is missing one? |
openmp/libomptarget/plugins/amdgpu/dynamic_hsa/hsa.h | ||
---|---|---|
306 | That's used in https://reviews.llvm.org/D138389 |
openmp/libomptarget/plugins/amdgpu/dynamic_hsa/hsa.h | ||
---|---|---|
306 | typedef enum { /** * Use a default floating-point rounding mode specified elsewhere. */ HSA_DEFAULT_FLOAT_ROUNDING_MODE_DEFAULT = 0, /** * Operations that specify the default floating-point mode are rounded to zero * by default. */ HSA_DEFAULT_FLOAT_ROUNDING_MODE_ZERO = 1, /** * Operations that specify the default floating-point mode are rounded to the * nearest representable number and that ties should be broken by selecting * the value with an even least significant bit. */ HSA_DEFAULT_FLOAT_ROUNDING_MODE_NEAR = 2 } hsa_default_float_rounding_mode_t; That's all I see in my installation, unless this was changed recently. |
openmp/libomptarget/plugins/amdgpu/dynamic_hsa/hsa.h | ||
---|---|---|
306 | There are 4 IEEE rounding modes and the hardware supports all of them so this is suspicious. Also "default" = near, so really this is missing +/- infinity |
openmp/libomptarget/plugins/amdgpu/dynamic_hsa/hsa.h | ||
---|---|---|
306 | That's a good point, Clang defined the following, which matches what I just looked up at https://en.wikipedia.org/wiki/IEEE_754#Rounding_rules. TowardZero = 0, ///< roundTowardZero. NearestTiesToEven = 1, ///< roundTiesToEven. TowardPositive = 2, ///< roundTowardPositive. TowardNegative = 3, ///< roundTowardNegative. NearestTiesToAway = 4, ///< roundTiesToAway. These three are all that's included in hsa.h for when we load the executable, not sure who would be the person to bring that up to, maybe @JonChesterfield has an idea. Maybe they're combining the +/- and nearest rounding modes somehow. In any case this is unrelated to this patch as it just copied what hsa.h gives it. |
This header file is a compromise between including enough of hsa.h to compile without the rocm source and not including all of it because it's large. Different people have taken different approaches to removing unused parts. There's a similar cuda.h near nvptx.
Is there a reason this is missing one?