Announcement

Collapse
No announcement yet.

AMD Radeon R600 GPU LLVM 3.3 Back-End Testing

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

  • #11
    Originally posted by jasn View Post
    I've emerged the latest related packages from Gentoo's x11 overlay in order to enable opencl support on my 6970M using the radeon driver, and it all emerged cleanly. Is there a simple way to test whether the opencl support exists, or simply get info on what's enabled?

    Thanks..


    perhaps cuda_memtest gives some meaningful output ?

    Comment


    • #12
      Originally posted by kernelOfTruth View Post
      perhaps cuda_memtest gives some meaningful output ?
      Thanks for the suggestion. However, when I added sekyfsr's overlay in order to emerge cuda_memtest, I realized that on my system this would require emerging gcc 4.4, and 4.6, and the cuda toolkit, before cuda_memtest. I'm hoping that there's a simpler method of simply determining if it's working. I next tried emerging the phoronix-test-suite-4.4.1, and running both the pyopencl test, and the opencl test suite, and both came back with failure messages indicating that I don't have opencl working on my system, ("The test run did not produce a result.", and "This test failed to run properly.")

      So after checking out Tom Stellard's blog post here, I'm now wondering if the code changes that he mentions there have been pushed to the normal master branches of the llvm, mesa, and libclc, respective repositories. The Gentoo x11 overlay libclc live ebuild does pull from his git repository, but doesn't specify the bfgminer branch, and the llvm and mesa live ebuilds don't pull from his git repositories at all, but rather the normal master branch repositories, (as one would expect).

      I'm going to try and edit those live ebuilds after adding them to my local overlay, and see if I can pull from Tom's bfgminer branches of those repositories and re-emerge llvm, mesa, and libclc. I'm hoping that the changes he mentions that are required for clang, ("checkout r179204 from the clang tree"), have been rolled into the current version in their repository. I think it's 182332. If I can get that far, I'll retry running the phoronix tests and see if there's any difference.

      Anyone else has some advice please feel free to pass it along.

      Thanks..

      Comment


      • #13
        Originally posted by jasn View Post
        Thanks for the suggestion. However, when I added sekyfsr's overlay in order to emerge cuda_memtest, I realized that on my system this would require emerging gcc 4.4, and 4.6, and the cuda toolkit, before cuda_memtest. I'm hoping that there's a simpler method of simply determining if it's working. I next tried emerging the phoronix-test-suite-4.4.1, and running both the pyopencl test, and the opencl test suite, and both came back with failure messages indicating that I don't have opencl working on my system, ("The test run did not produce a result.", and "This test failed to run properly.")
        If you need to verify that you have OpenCL installed correctly, you can use these simple demos: http://cgit.freedesktop.org/~tstellar/opencl-example/ I usually use the hello_world for this.

        So after checking out Tom Stellard's blog post here, I'm now wondering if the code changes that he mentions there have been pushed to the normal master branches of the llvm, mesa, and libclc, respective repositories. The Gentoo x11 overlay libclc live ebuild does pull from his git repository, but doesn't specify the bfgminer branch, and the llvm and mesa live ebuilds don't pull from his git repositories at all, but rather the normal master branch repositories, (as one would expect).

        I'm going to try and edit those live ebuilds after adding them to my local overlay, and see if I can pull from Tom's bfgminer branches of those repositories and re-emerge llvm, mesa, and libclc. I'm hoping that the changes he mentions that are required for clang, ("checkout r179204 from the clang tree"), have been rolled into the current version in their repository. I think it's 182332. If I can get that far, I'll retry running the phoronix tests and see if there's any difference.

        Anyone else has some advice please feel free to pass it along.

        Thanks..
        All of the code in my bfgminer branches has been pushed upstream, so everything should work fine with the gentoo overlay.

        Comment


        • #14
          Thanks Tom..

          Originally posted by tstellar View Post
          If you need to verify that you have OpenCL installed correctly, you can use these simple demos: http://cgit.freedesktop.org/~tstellar/opencl-example/ I usually use the hello_world for this.
          (Proving that it's dangerous to give a compiler to someone who's never written a program in his life), I tried compiling the programs in your opencl-example repository, but I'm getting no joy. Here's the output from issuing a make command from the directory;
          Code:
          make
          cc -g   -c -o hello_world.o hello_world.c
          cc -g   -c -o cl_simple.o cl_simple.c
          cl_simple.c: In function 'clSimpleCreateBuffer':
          cl_simple.c:80:24: warning: format '%u' expects argument of type 'unsigned int', but argument 5 has type 'cl_mem_flags' [-Wformat]
          cl_simple.c:80:24: warning: format '%u' expects argument of type 'unsigned int', but argument 6 has type 'size_t' [-Wformat]
          cc -g   -c -o cl_util.o cl_util.c
          gcc -o hello_world hello_world.o cl_simple.o cl_util.o -L/usr/local/lib -lOpenCL
          /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/../../../../lib64/libOpenCL.so: undefined reference to `llvm::DIBuilder::createImportedModule(llvm::DIScope, llvm::DINameSpace, unsigned int)'
          collect2: error: ld returned 1 exit status
          make: *** [hello_world] Error 1
          Please feel free to point out the obvious to me..

          Originally posted by tstellar View Post
          All of the code in my bfgminer branches has been pushed upstream, so everything should work fine with the gentoo overlay.
          Again, thanks for not only the confirmation, but thanks for all the work as well.

          Jason

          Comment


          • #15
            Thank you Tom..

            (for the work and reply)

            I was able to compile the opencl-example programs after updating my system today which included updating the latest git versions of clang, llvm, and mesa. The output does seem to indicate that opencl is indeed working on my system;
            Code:
            ./hello_world
            There are 1 platforms.
            There are 1 GPU devices.
            clCreateContext() succeeded.
            clCreateCommandQueue() succeeded.
            clCreateProgramWithSource() suceeded.
            clBuildProgram() suceeded.
            clCreateKernel() suceeded.
            clCreateBuffer() succeeded.
            clSetKernelArg() succeeded.
            clEnqueueNDRangeKernel() suceeded.
            clEnqueueReadBuffer() suceeded.
            pi = 0.000000
            Thanks again..

            Jason

            Comment


            • #16
              Originally posted by jasn View Post
              Thank you Tom..

              (for the work and reply)

              I was able to compile the opencl-example programs after updating my system today which included updating the latest git versions of clang, llvm, and mesa. The output does seem to indicate that opencl is indeed working on my system;
              Code:
              ./hello_world
              There are 1 platforms.
              There are 1 GPU devices.
              clCreateContext() succeeded.
              clCreateCommandQueue() succeeded.
              clCreateProgramWithSource() suceeded.
              clBuildProgram() suceeded.
              clCreateKernel() suceeded.
              clCreateBuffer() succeeded.
              clSetKernelArg() succeeded.
              clEnqueueNDRangeKernel() suceeded.
              clEnqueueReadBuffer() suceeded.
              pi = 0.000000
              Thanks again..

              Jason
              The hello_world program is missing a call to clFinish() which is probably why it didn't work for you. I just pushed a fix to the opencl-examples repo. Can you pull from there and try again? I think this same bug exists in the other demos too, so they may not work for you.

              Comment


              • #17
                Originally posted by tstellar View Post
                The hello_world program is missing a call to clFinish() which is probably why it didn't work for you. I just pushed a fix to the opencl-examples repo. Can you pull from there and try again? I think this same bug exists in the other demos too, so they may not work for you.
                The other demos should be fixed now too.

                Comment


                • #18
                  No problem..

                  Here's the updated output;
                  Code:
                  ./hello_world
                  There are 1 platforms.
                  There are 1 GPU devices.
                  clCreateContext() succeeded.
                  clCreateCommandQueue() succeeded.
                  clCreateProgramWithSource() suceeded.
                  clBuildProgram() suceeded.
                  clCreateKernel() suceeded.
                  clCreateBuffer() succeeded.
                  clSetKernelArg() succeeded.
                  clEnqueueNDRangeKernel() suceeded.
                  clFinish() succeeded.
                  clEnqueueReadBuffer() suceeded.
                  pi = 3.141590
                  BTW, run_tests.sh script produces a final tally of 25 passes, 46 fails, which is up from the 17 passes when I initially tried it earlier.

                  Thanks Tom!

                  Jason

                  Comment


                  • #19
                    Originally posted by jasn View Post
                    No problem..

                    Here's the updated output;
                    Code:
                    ./hello_world
                    There are 1 platforms.
                    There are 1 GPU devices.
                    clCreateContext() succeeded.
                    clCreateCommandQueue() succeeded.
                    clCreateProgramWithSource() suceeded.
                    clBuildProgram() suceeded.
                    clCreateKernel() suceeded.
                    clCreateBuffer() succeeded.
                    clSetKernelArg() succeeded.
                    clEnqueueNDRangeKernel() suceeded.
                    clFinish() succeeded.
                    clEnqueueReadBuffer() suceeded.
                    pi = 3.141590
                    BTW, run_tests.sh script produces a final tally of 25 passes, 46 fails, which is up from the 17 passes when I initially tried it earlier.

                    Thanks Tom!

                    Jason
                    They should all pass, does your tree include the "Add clFinish() call to clSimpleEnqueueNDRangeKernel" commit? I just pushed this a few minutes ago.

                    Comment


                    • #20
                      So I just now performed a git clone of the opencl-example repository. Next thing is make. Here's that output;
                      Code:
                      make
                      cc -g   -c -o hello_world.o hello_world.c
                      cc -g   -c -o cl_simple.o cl_simple.c
                      cl_simple.c: In function 'clSimpleCreateBuffer':
                      cl_simple.c:80:24: warning: format '%u' expects argument of type 'unsigned int', but argument 5 has type 'cl_mem_flags' [-Wformat]
                      cl_simple.c:80:24: warning: format '%u' expects argument of type 'unsigned int', but argument 6 has type 'size_t' [-Wformat]
                      cc -g   -c -o cl_util.o cl_util.c
                      gcc -o hello_world hello_world.o cl_simple.o cl_util.o -L/usr/local/lib -lOpenCL
                      cc -g   -c -o math-int.o math-int.c
                      gcc -o math-int math-int.o cl_simple.o cl_util.o -L/usr/local/lib -lOpenCL
                      cc -g   -c -o get_global_id.o get_global_id.c
                      gcc -o get-global-id get_global_id.o cl_simple.o cl_util.o -L/usr/local/lib -lOpenCL
                      cc -g   -c -o get_global_id_2d.o get_global_id_2d.c
                      gcc -o get-global-id-2d get_global_id_2d.o cl_simple.o cl_util.o -L/usr/local/lib -lOpenCL
                      cc -g   -c -o loop.o loop.c
                      gcc -o loop loop.o cl_simple.o cl_util.o -L/usr/local/lib -lOpenCL
                      cc -g   -c -o get_global_id_3d.o get_global_id_3d.c
                      get_global_id_3d.c: In function 'main':
                      get_global_id_3d.c:36:38: warning: passing argument 4 of 'clSimpleEnqueueNDRangeKernel' from incompatible pointer type [enabled by default]
                      In file included from get_global_id_3d.c:6:0:
                      cl_simple.h:19:10: note: expected 'const size_t *' but argument is of type 'size_t (*)[3]'
                      get_global_id_3d.c:36:38: warning: passing argument 5 of 'clSimpleEnqueueNDRangeKernel' from incompatible pointer type [enabled by default]
                      In file included from get_global_id_3d.c:6:0:
                      cl_simple.h:19:10: note: expected 'const size_t *' but argument is of type 'size_t (*)[3]'
                      gcc -o get-global-id-3d get_global_id_3d.o cl_simple.o cl_util.o -L/usr/local/lib -lOpenCL
                      cc -g   -c -o mat_mul.o mat_mul.c
                      gcc -o mat-mul mat_mul.o cl_simple.o cl_util.o -L/usr/local/lib -lOpenCL
                      cc -g   -c -o use_host_ptr.o use_host_ptr.c
                      gcc -o use-host-ptr use_host_ptr.o cl_simple.o cl_util.o -L/usr/local/lib -lOpenCL
                      cc -g   -c -o copy_host_ptr.o copy_host_ptr.c
                      gcc -o copy-host-ptr copy_host_ptr.o cl_simple.o cl_util.o -L/usr/local/lib -lOpenCL
                      cc -g   -c -o memset.o memset.c
                      memset.c: In function 'main':
                      memset.c:47:7: warning: format '%i' expects argument of type 'int', but argument 3 has type 'size_t' [-Wformat]
                      gcc -o memset memset.o cl_simple.o cl_util.o -L/usr/local/lib -lOpenCL
                      cc -g   -c -o vec_load.o vec_load.c
                      gcc -o vec-load vec_load.o cl_simple.o cl_util.o -L/usr/local/lib -lOpenCL
                      and then;
                      Code:
                      ./run_tests.sh
                      Running ./math-int add 1 2 3
                      Failed
                      Running ./math-int add 2 1 3
                      Passed
                      Running ./math-int add -5 10 5
                      Failed
                      Running ./math-int add -1 -4 -5
                      Failed
                      Running ./math-int mul 4 5 20
                      Failed
                      Running ./math-int mul 8 0 0
                      Failed
                      Running ./math-int mul -3 8 -24
                      Failed
                      Running ./math-int mul -12 -6 72
                      Failed
                      Running ./math-int div 20 5 4
                      Failed
                      Running ./math-int div 23 5 4
                      Passed
                      Running ./math-int div 30 1 30
                      Failed
                      Running ./math-int div 57 -1 -57
                      Failed
                      Running ./math-int div 10 -2 -5
                      Failed
                      Running ./math-int div 17 -3 -5
                      Passed
                      Running ./math-int div -28 2 -14
                      Failed
                      Running ./math-int div -8 3 -2
                      Failed
                      Running ./math-int div -25 -5 5
                      Failed
                      Running ./math-int div -24 -5 4
                      Failed
                      Running ./math-int mod 18 6 0
                      Failed
                      Running ./math-int mod 59 12 11
                      Failed
                      Running ./math-int mod -20 5 0
                      Failed
                      Running ./math-int mod -18 5 -3
                      Failed
                      Running ./math-int mod 50 -10 0
                      Failed
                      Running ./math-int mod 16 -3 1
                      Failed
                      Running ./math-int mod 2147483647 12345 9172
                      Failed
                      Running ./math-int mod -2147483648 476 -128
                      Failed
                      Running ./math-int mod 10 20 10
                      Failed
                      Running ./math-int mod_nine 18 9 0
                      Failed
                      Running ./math-int mod_nine 23 9 5
                      Failed
                      Running ./math-int mod_four 20 4 0
                      Failed
                      Running ./math-int mod_four 5 4 1
                      Failed
                      Running ./get-global-id 100 100
                      Passed
                      Running ./get-global-id 250 1
                      Passed
                      Running ./math-int if_gt 5 4 1
                      Failed
                      Running ./math-int if_gt 5 6 0
                      Failed
                      Running ./math-int if_gt -20 10 0
                      Passed
                      Running ./math-int if_gt -5 8 0
                      Passed
                      Running ./math-int if_gt 12 -15 1
                      Failed
                      Running ./math-int if_gt 16 -3 1
                      Passed
                      Running ./math-int if_ge 8 7 1
                      Passed
                      Running ./math-int if_ge 10 10 1
                      Passed
                      Running ./math-int if_ge 20 30 0
                      Failed
                      Running ./math-int if_ge 3 -8 1
                      Failed
                      Running ./math-int if_ge -5 5 0
                      Failed
                      Running ./math-int if_ge -20 10 0
                      Passed
                      Running ./math-int if_eq 21 21 1
                      Failed
                      Running ./math-int if_eq 30 18 0
                      Failed
                      Running ./math-int if_eq -12 12 0
                      Passed
                      Running ./math-int if_eq 81 -81 0
                      Passed
                      Running ./math-int if_lt 2 10 1
                      Failed
                      Running ./math-int if_lt -20 3 1
                      Passed
                      Running ./math-int if_lt 15 3 0
                      Failed
                      Running ./math-int if_le 20 25 1
                      Failed
                      Running ./math-int if_le 18 18 1
                      Passed
                      Running ./math-int if_le -10 5 1
                      Passed
                      Running ./math-int if_le 18 9 0
                      Failed
                      Running ./math-int if_le 10 -20 0
                      Passed
                      Running ./math-int if_ne 10 9 1
                      Failed
                      Running ./math-int if_ne -20 20 1
                      Passed
                      Running ./math-int if_ne 31 -31 1
                      Passed
                      Running ./math-int if_ne 3 3 0
                      Failed
                      Running ./loop loop_lt 10
                      Passed
                      Running ./loop loop_le 10
                      Passed
                      Running ./loop loop_gt 10
                      Passed
                      Running ./loop loop_ge 10
                      Passed
                      Running ./math-int rotl 1 1 2
                      Failed
                      Running ./math-int rotl 1 32 1
                      Failed
                      Running ./math-int rotl -1 5 -1
                      Failed
                      Running ./math-int rotl 4096 23 8
                      Failed
                      Running ./use-host-ptr 10
                      Passed
                      Running ./vec-load
                      Passed
                      25 passes, 46 fails
                      I believe that this tree does include the "Add clFinish() call to clSimpleEnqueueNDRangeKernel" commit, I'm just not sure what's causing the other fails.

                      Thanks..

                      Jason

                      Comment

                      Working...
                      X