Announcement

Collapse
No announcement yet.

GCC 4.5 vs. 4.6 On AMD's FX-4100 Bulldozer

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #21
    Originally posted by ssam View Post
    does GCC 4.6 optimise for FMA4 and XOP.

    FMA can fuse a multiply and an add into a single step, and so could give a big speed up to some code.

    also wouldn't it be great if GCC had a 'fastest flags that don't break the test-suite' option.
    Gcc 4.5 already supports FMA4 and XOP, though I'm not sure how well they get used without instrinsics. In any case FMA won't get used without -Ofast/-ffast-math since it changes the results compared to fmul+fadd.

    Comment


    • #22
      Originally posted by Azpegath View Post
      He should be running the latest VDrift (2011-09) instead of the one from 2010-06, perhaps that is a lot better. I've taken the old GLSLValidator from 3DLabs and updated it to compile on a "modern" Linux distribution with wxWidgets 2.8. I was planning on running their shaders through that since it only supports up to GLSL1.2. I tested some of their shaders and some of those fragment shaders failed.
      The code/program can be found at https://github.com/AzP/GLSL-Validate/
      If anyone's interested in seeing how Mesa parses shaders, I had ported Aras' Mesa glsl optimizer back to linux in the beginning of the summer. It's not only a syntax check, but also outputting the common optimizations, I found it useful in shader development.
      You may need to get the code from the linux merge, I haven't tested if master still runs on linux, and Aras is mostly win/mac.

      GLSL optimizer based on Mesa's GLSL compiler. Used to be used in Unity for mobile shader optimization. - aras-p/glsl-optimizer

      Comment


      • #23
        Originally posted by Otus View Post
        Gcc 4.5 already supports FMA4 and XOP, though I'm not sure how well they get used without instrinsics. In any case FMA won't get used without -Ofast/-ffast-math since it changes the results compared to fmul+fadd.
        thanks.

        FMA should improve the results of calculations though, as the rounding is delayed. (I know sometimes one prefers worse precision if there is better consistency across different architectures)

        Comment


        • #24
          Originally posted by ssam View Post
          does GCC 4.6 optimise for FMA4 and XOP.
          Ummm, if you google for for "-march=bdver1" you'll find all the information you need! Most important piece of info is this: http://goo.gl/LXkBr.

          Comment


          • #25
            gcc is far from ideal for Bulldozer

            Originally posted by Otus View Post
            Gcc 4.5 already supports FMA4 and XOP, though I'm not sure how well they get used without instrinsics. In any case FMA won't get used without -Ofast/-ffast-math since it changes the results compared to fmul+fadd.
            Nope! I'd share a document with you, but I don't want to get my butt kicked, so I found some public info on the home page of the Swiss National Supercomputing Center (they are just getting their Interlagos-based Cray XMT shipped ) which covers the most important stuff:

            Comment


            • #26
              Originally posted by Michael View Post
              I always welcome Openbenchmarking.org feedback, particularly for user-interface design things as that's not my area expertise.

              The lines should wrap now.
              Excellent!

              Another minor issue, reproducible with both Chromium and Google Chrome version 14.0.835.202, see screenshot: http://dl.dropbox.com/u/239841/openb...hromium_14.png

              Comment


              • #27
                Originally posted by pszilard View Post
                Nope! I'd share a document with you, but I don't want to get my butt kicked, so I found some public info on the home page of the Swiss National Supercomputing Center (they are just getting their Interlagos-based Cray XMT shipped ) which covers the most important stuff:
                http://user.cscs.ch/news/2011/10/17/...-xop-and-fma4/
                I remember testing XOP with gcc 4.5 and gcc 4.5 release notes say that's possible:

                Support for the XOP, FMA4, and LWP instruction sets for the AMD Orochi processors are now available with the -mxop, -mfma4, and -mlwp options.

                Comment


                • #28
                  Originally posted by Azpegath View Post
                  Yes they split the packages into src and data, and haven't released a data package for it. Sadly they just seem to want to distribute data via svn since their previous version. I've been trying to get them to release a data tar file matching the source release so we can get an updated package in Gentoo, but the devs doesn't reply on IRC. Their channel is just quiet. I've only tried for 2 whole days, but you'd think that somebody would reply.

                  There's a bug on the Gentoo bugzilla about it describing the issue furter (https://bugs.gentoo.org/show_bug.cgi?id=351409#c7)
                  IRC is by apppointment only afaik. Have you considered the forum http://vdrift.net/ or the issue tracker https://github.com/VDrift/vdrift/issues ?

                  Comment


                  • #29
                    Originally posted by Azpegath View Post
                    He should be running the latest VDrift (2011-09) instead of the one from 2010-06, perhaps that is a lot better.
                    I tested vdrift a very little bit today on mesa git on HD 6550 mobile. At least one shader failed to compile:
                    Code:
                    INFO: ----- Start Shader Compile Log for /usr/share/vdrift//shaders/logluminance/fragment.glsl -----
                    INFO: 0:0(0): error: no matching function for call to `texture2DLod(sampler2D, vec2, float)'
                          0:35(73): error: type mismatch
                          0:35(73): error: Operands to arithmetic operators must be numeric
                          
                    INFO: ----- End Shader Compile Log -----
                    INFO: ----- Start Shader Link Log for /usr/share/vdrift//shaders/logluminance/vertex.glsl and /usr/share/vdrift//shaders/logluminance/fragment.glsl -----
                    INFO: error: linking with uncompiled shader
                    INFO: ----- End Shader Link Log -----
                    ERROR: Shader compilation failure: /usr/share/vdrift//shaders/logluminance/vertex.glsl and /usr/share/vdrift//shaders/logluminance/fragment.glsl
                    ERROR: 
                    ERROR: Vertex shader:
                    ERROR: 1    : #version 120
                    ERROR: 2    : #define _TINY_
                    ERROR: 3    : #define _SSAO_HIGH_
                    ERROR: 4    : #define _NORMALMAPS_
                    ERROR: 5    : #define _SHADOWSHIGH_
                    ERROR: 6    : #define _CSM3_
                    ERROR: 7    : #define _CSM2_
                    ERROR: 8    : #define _SHADOWS_
                    ERROR: 9    : #define _REFLECTIONDYNAMIC_
                    ERROR: 10   : #define SCREENRESY 720
                    ERROR: 11   : #define SCREENRESX 1280
                    ERROR: 12   : varying vec2 tu0coord;
                    ERROR: 13   : 
                    ERROR: 14   : void main()
                    ERROR: 15   : {
                    ERROR: 16   :   // Transforming the vertex
                    ERROR: 17   :   gl_Position = gl_ProjectionMatrix * gl_ModelViewMatrix * gl_Vertex;
                    ERROR: 18   : 
                    ERROR: 19   :   tu0coord = vec2(gl_MultiTexCoord0);
                    ERROR: 20   : }
                    ERROR: 21   : 
                    ERROR: 
                    ERROR: Fragment shader:
                    ERROR: 1    : #version 120
                    ERROR: 2    : #define _TINY_
                    ERROR: 3    : #define _SSAO_HIGH_
                    ERROR: 4    : #define _NORMALMAPS_
                    ERROR: 5    : #define _SHADOWSHIGH_
                    ERROR: 6    : #define _CSM3_
                    ERROR: 7    : #define _CSM2_
                    ERROR: 8    : #define _SHADOWS_
                    ERROR: 9    : #define _REFLECTIONDYNAMIC_
                    ERROR: 10   : #define SCREENRESY 720
                    ERROR: 11   : #define SCREENRESX 1280
                    ERROR: 12   : varying vec2 tu0coord;
                    ERROR: 13   : 
                    ERROR: 14   : uniform sampler2D tu0_2D;
                    ERROR: 15   : 
                    ERROR: 16   : const vec3 LUMINANCE = vec3(0.2125, 0.7154, 0.0721);
                    ERROR: 17   : const float DELTA = 0.0001;
                    ERROR: 18   : 
                    ERROR: 19   : /*const float scale = 0.1;
                    ERROR: 20   : const float offset = 5.;
                    ERROR: 21   : const float timefactor = 0.1;
                    ERROR: 22   : const float scale_tiny = 3.0;
                    ERROR: 23   : const float offset_tiny = -0.12;*/
                    ERROR: 24   : 
                    ERROR: 25   : const float scale = 0.25;
                    ERROR: 26   : const float offset = 2.0;
                    ERROR: 27   : const float timefactor = 0.1;
                    ERROR: 28   : //const float timefactor = 1.0;
                    ERROR: 29   : 
                    ERROR: 30   : void main()
                    ERROR: 31   : {
                    ERROR: 32   :   #ifdef _TINY_
                    ERROR: 33   :   float lod = 9;
                    ERROR: 34   :   //gl_FragColor.rgb = vec3(1.,1.,1.)*(texture2DLod(tu0_2D, tu0coord, lod).r+offset_tiny)*scale_tiny;
                    ERROR: 35   :   gl_FragColor.rgb = vec3(1.,1.,1.)*texture2DLod(tu0_2D, tu0coord, lod).r;
                    ERROR: 36   :   gl_FragColor.a = timefactor;
                    ERROR: 37   :   #else
                    ERROR: 38   :   float luminance = dot(LUMINANCE,texture2D(tu0_2D, tu0coord).rgb);
                    ERROR: 39   :   float logluminance = log(luminance+DELTA);
                    ERROR: 40   :   gl_FragColor.rgb = vec3(1.,1.,1.)*(logluminance+offset)*scale;
                    ERROR: 41   :   #endif
                    ERROR: 42   : }
                    ERROR: 43   : 
                    ERROR: 
                    ERROR: Disabling shaders due to shader loading error
                    The game runs actually pretty well, except for the car, which is completely white...

                    Comment


                    • #30
                      Originally posted by ChrisXY View Post
                      I tested vdrift a very little bit today on mesa git on HD 6550 mobile. At least one shader failed to compile:
                      Code:
                      INFO: ----- Start Shader Compile Log for /usr/share/vdrift//shaders/logluminance/fragment.glsl -----
                      INFO: 0:0(0): error: no matching function for call to `texture2DLod(sampler2D, vec2, float)'
                            0:35(73): error: type mismatch
                            0:35(73): error: Operands to arithmetic operators must be numeric
                            
                      INFO: ----- End Shader Compile Log -----
                      INFO: ----- Start Shader Link Log for /usr/share/vdrift//shaders/logluminance/vertex.glsl and /usr/share/vdrift//shaders/logluminance/fragment.glsl -----
                      INFO: error: linking with uncompiled shader
                      INFO: ----- End Shader Link Log -----
                      ERROR: Shader compilation failure: /usr/share/vdrift//shaders/logluminance/vertex.glsl and /usr/share/vdrift//shaders/logluminance/fragment.glsl
                      ERROR: 
                      ERROR: Vertex shader:
                      ERROR: 1    : #version 120
                      ERROR: 2    : #define _TINY_
                      ERROR: 3    : #define _SSAO_HIGH_
                      ERROR: 4    : #define _NORMALMAPS_
                      ERROR: 5    : #define _SHADOWSHIGH_
                      ERROR: 6    : #define _CSM3_
                      ERROR: 7    : #define _CSM2_
                      ERROR: 8    : #define _SHADOWS_
                      ERROR: 9    : #define _REFLECTIONDYNAMIC_
                      ERROR: 10   : #define SCREENRESY 720
                      ERROR: 11   : #define SCREENRESX 1280
                      ERROR: 12   : varying vec2 tu0coord;
                      ERROR: 13   : 
                      ERROR: 14   : void main()
                      ERROR: 15   : {
                      ERROR: 16   :   // Transforming the vertex
                      ERROR: 17   :   gl_Position = gl_ProjectionMatrix * gl_ModelViewMatrix * gl_Vertex;
                      ERROR: 18   : 
                      ERROR: 19   :   tu0coord = vec2(gl_MultiTexCoord0);
                      ERROR: 20   : }
                      ERROR: 21   : 
                      ERROR: 
                      ERROR: Fragment shader:
                      ERROR: 1    : #version 120
                      ERROR: 2    : #define _TINY_
                      ERROR: 3    : #define _SSAO_HIGH_
                      ERROR: 4    : #define _NORMALMAPS_
                      ERROR: 5    : #define _SHADOWSHIGH_
                      ERROR: 6    : #define _CSM3_
                      ERROR: 7    : #define _CSM2_
                      ERROR: 8    : #define _SHADOWS_
                      ERROR: 9    : #define _REFLECTIONDYNAMIC_
                      ERROR: 10   : #define SCREENRESY 720
                      ERROR: 11   : #define SCREENRESX 1280
                      ERROR: 12   : varying vec2 tu0coord;
                      ERROR: 13   : 
                      ERROR: 14   : uniform sampler2D tu0_2D;
                      ERROR: 15   : 
                      ERROR: 16   : const vec3 LUMINANCE = vec3(0.2125, 0.7154, 0.0721);
                      ERROR: 17   : const float DELTA = 0.0001;
                      ERROR: 18   : 
                      ERROR: 19   : /*const float scale = 0.1;
                      ERROR: 20   : const float offset = 5.;
                      ERROR: 21   : const float timefactor = 0.1;
                      ERROR: 22   : const float scale_tiny = 3.0;
                      ERROR: 23   : const float offset_tiny = -0.12;*/
                      ERROR: 24   : 
                      ERROR: 25   : const float scale = 0.25;
                      ERROR: 26   : const float offset = 2.0;
                      ERROR: 27   : const float timefactor = 0.1;
                      ERROR: 28   : //const float timefactor = 1.0;
                      ERROR: 29   : 
                      ERROR: 30   : void main()
                      ERROR: 31   : {
                      ERROR: 32   :   #ifdef _TINY_
                      ERROR: 33   :   float lod = 9;
                      ERROR: 34   :   //gl_FragColor.rgb = vec3(1.,1.,1.)*(texture2DLod(tu0_2D, tu0coord, lod).r+offset_tiny)*scale_tiny;
                      ERROR: 35   :   gl_FragColor.rgb = vec3(1.,1.,1.)*texture2DLod(tu0_2D, tu0coord, lod).r;
                      ERROR: 36   :   gl_FragColor.a = timefactor;
                      ERROR: 37   :   #else
                      ERROR: 38   :   float luminance = dot(LUMINANCE,texture2D(tu0_2D, tu0coord).rgb);
                      ERROR: 39   :   float logluminance = log(luminance+DELTA);
                      ERROR: 40   :   gl_FragColor.rgb = vec3(1.,1.,1.)*(logluminance+offset)*scale;
                      ERROR: 41   :   #endif
                      ERROR: 42   : }
                      ERROR: 43   : 
                      ERROR: 
                      ERROR: Disabling shaders due to shader loading error
                      The game runs actually pretty well, except for the car, which is completely white...
                      Look here: http://vdrift.net/Forum/viewtopic.php?t=1589

                      Comment

                      Working...
                      X