9 Replies Latest reply on Aug 22, 2011 3:33 PM by MicahVillmow

    Double Precision log() on firestream 9270

    jasno

      Hi,

          I'm trying to figure out if the log() function is supported in double precision

      on a  firestream 9270 using sdk2.3 ? I found this link

      http://developer.amd.com/support/KnowledgeBase/Lists/KnowledgeBase/DispForm.aspx?ID=88

      but it relates to sdk2.1. I can't find docs for sdk2.3, on the latest 2.5 release in

      AMD Accelerated Parallel Processing OpenCL™ Programming Guide (v1.3c)

      it says that it is "beta" (table A.1) so I'm not sure what that means or whether is was in beta for 2.3 or still unavailable. I also need double precision sincos().

      Can anyone enlighten me. I can't install 2.5 as the machine is not under my control, but if it fixes my problem then I can request it is updated.

       

      --

      jason

        • Double Precision log() on firestream 9270
          jasno

          So I have persuaded the sys devs to update to sdk2.5, but I still have the same problem. Details w.r.t. the card are shown below. Do any of these details inform me as to whether the card supports log in double precision ?

           ---------------------------------
           Device ATI RV770
           ---------------------------------
            CL_DEVICE_NAME:             ATI RV770
            CL_DEVICE_VENDOR:             Advanced Micro Devices, Inc.
            CL_DRIVER_VERSION:             CAL 1.4.1016
            CL_DEVICE_VERSION:             OpenCL 1.0 AMD-APP-SDK-v2.5 (684.213)
            CL_DEVICE_TYPE:            CL_DEVICE_TYPE_GPU
            CL_DEVICE_MAX_COMPUTE_UNITS:        10
            CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS:    3
            CL_DEVICE_MAX_WORK_ITEM_SIZES:    256 / 256 / 256
            CL_DEVICE_MAX_WORK_GROUP_SIZE:    256
            CL_DEVICE_MAX_CLOCK_FREQUENCY:    0 MHz
            CL_DEVICE_ADDRESS_BITS:        32
            CL_DEVICE_MAX_MEM_ALLOC_SIZE:        256 MByte
            CL_DEVICE_GLOBAL_MEM_SIZE:        1024 MByte
            CL_DEVICE_ERROR_CORRECTION_SUPPORT:    no
            CL_DEVICE_LOCAL_MEM_TYPE:        global
            CL_DEVICE_LOCAL_MEM_SIZE:        16 KByte
            CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE:    64 KByte
            CL_DEVICE_QUEUE_PROPERTIES:        CL_QUEUE_PROFILING_ENABLE
            CL_DEVICE_IMAGE_SUPPORT:        0
            CL_DEVICE_MAX_READ_IMAGE_ARGS:    0
            CL_DEVICE_MAX_WRITE_IMAGE_ARGS:    0
            CL_DEVICE_SINGLE_FP_CONFIG:        INF-quietNaNs round-to-nearest round-to-zero round-to-inf fma

            CL_DEVICE_IMAGE <dim>            2D_MAX_WIDTH     0
                              2D_MAX_HEIGHT     0
                              3D_MAX_WIDTH     0
                              3D_MAX_HEIGHT     0
                              3D_MAX_DEPTH     0

            CL_DEVICE_EXTENSIONS:            cl_amd_fp64
                              cl_khr_gl_sharing
                              cl_amd_device_attribute_query

            CL_DEVICE_PREFERRED_VECTOR_WIDTH_<t>    CHAR 16, SHORT 8, INT 4, LONG 2, FLOAT 4, DOUBLE 0

           

          Interestingly is says it supports OpenCL 1.0 whereas the same machine lists the CPU device as supporting OpenCL 1.1 Why should that be ?

           

          --

          Jason

          • Double Precision log() on firestream 9270
            MicahVillmow
            cl_amd_fp64 <-- this means that a subset of double's are supported.
              • Double Precision log() on firestream 9270
                jasno

                 

                Originally posted by: MicahVillmow cl_amd_fp64 <-- this means that a subset of double's are supported.


                 

                So is there some list somewhere which tells me which bits are supported and which not ?

                 

                  • Double Precision log() on firestream 9270
                    genaganna

                     

                    Originally posted by: jasno
                    Originally posted by: MicahVillmow cl_amd_fp64 <-- this means that a subset of double's are supported.


                     

                        So is there some list somewhere which tells me which bits are supported and which not ?

                     

                        



                    Please see Table A.1 of OpenCL programming guide.

                      • Double Precision log() on firestream 9270
                        jasno

                         

                        Originally posted by: genaganna
                        Originally posted by: jasno
                        Originally posted by: MicahVillmow cl_amd_fp64 <-- this means that a subset of double's are supported.


                         

                         

                         

                            So is there some list somewhere which tells me which bits are supported and which not ?

                         

                         

                         

                            



                         

                        Please see Table A.1 of OpenCL programming guide.

                         

                         

                        Thats where I started, for log() for my card it says 'beta', but what does that mean? Does it mean it just gives the wrong answers? Does it mean it converts to float and gives a lower precision result ? Does it mean it sometimes work ?

                         

                        --

                        Jason

                  • Double Precision log() on firestream 9270
                    MicahVillmow
                    basically if it says 'beta', then that means we might not match the required OpenCL accuracy for all double precision operations.
                      • Double Precision log() on firestream 9270
                        jasno

                         

                        Originally posted by: MicahVillmow basically if it says 'beta', then that means we might not match the required OpenCL accuracy for all double precision operations.


                         

                        I think it is worse than not matching required accuracy. I have code that attempts

                        Error on double  element: val=1.217433281693033109149837 gpu=1.217433 cpu=1.103374  diff=0.114060

                        thats nearly 10% out.

                        Is this really a bug ?

                         

                        --

                        jason

                      • Double Precision log() on firestream 9270
                        MicahVillmow
                        I'm not a math expert so I can't say, but once it is no longer 'beta', the precision will fall within the bounds set forth by the OpenCL spec. It looks like the value that is the input is being returned as the output, which means the function is not implemented but a stub function is being run instead.