[Openmp-commits] [PATCH] D140213: [OpenMP][libomptarget] Add missing symbols in dynamic_hsa

Matt Arsenault via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Fri Dec 16 06:43:35 PST 2022


arsenm added inline comments.


================
Comment at: openmp/libomptarget/plugins/amdgpu/dynamic_hsa/hsa.h:306
+  HSA_DEFAULT_FLOAT_ROUNDING_MODE_NEAR = 2,
+} hsa_default_float_rounding_mode_t;
+
----------------
kevinsala wrote:
> jhuber6 wrote:
> > arsenm wrote:
> > > Is there a reason this is missing one?
> > ```
> > 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.
> That's used in https://reviews.llvm.org/D138389
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


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D140213/new/

https://reviews.llvm.org/D140213



More information about the Openmp-commits mailing list