Announcement

Collapse
No announcement yet.

AMD Radeon R600 GPU LLVM 3.3 Back-End Testing

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

  • #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


            • #21
              Originally posted by jasn View Post
              So I just now performed a git clone of the opencl-example repository. Next thing is make. Here's that output;

              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
              Looks like I missed a few places that need to call clFinish(). I've pushed a fix to my opencl-example repo. Can you try again?

              Comment


              • #22
                Tom,

                Everything works perfectly now.
                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
                Code:
                ./run_tests.sh
                Running ./math-int add 1 2 3
                Passed
                Running ./math-int add 2 1 3
                Passed
                Running ./math-int add -5 10 5
                Passed
                Running ./math-int add -1 -4 -5
                Passed
                Running ./math-int mul 4 5 20
                Passed
                Running ./math-int mul 8 0 0
                Passed
                Running ./math-int mul -3 8 -24
                Passed
                Running ./math-int mul -12 -6 72
                Passed
                Running ./math-int div 20 5 4
                Passed
                Running ./math-int div 23 5 4
                Passed
                Running ./math-int div 30 1 30
                Passed
                Running ./math-int div 57 -1 -57
                Passed
                Running ./math-int div 10 -2 -5
                Passed
                Running ./math-int div 17 -3 -5
                Passed
                Running ./math-int div -28 2 -14
                Passed
                Running ./math-int div -8 3 -2
                Passed
                Running ./math-int div -25 -5 5
                Passed
                Running ./math-int div -24 -5 4
                Passed
                Running ./math-int mod 18 6 0
                Passed
                Running ./math-int mod 59 12 11
                Passed
                Running ./math-int mod -20 5 0
                Passed
                Running ./math-int mod -18 5 -3
                Passed
                Running ./math-int mod 50 -10 0
                Passed
                Running ./math-int mod 16 -3 1
                Passed
                Running ./math-int mod 2147483647 12345 9172
                Passed
                Running ./math-int mod -2147483648 476 -128
                Passed
                Running ./math-int mod 10 20 10
                Passed
                Running ./math-int mod_nine 18 9 0
                Passed
                Running ./math-int mod_nine 23 9 5
                Passed
                Running ./math-int mod_four 20 4 0
                Passed
                Running ./math-int mod_four 5 4 1
                Passed
                Running ./get-global-id 100 100
                Passed
                Running ./get-global-id 250 1
                Passed
                Running ./math-int if_gt 5 4 1
                Passed
                Running ./math-int if_gt 5 6 0
                Passed
                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
                Passed
                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
                Passed
                Running ./math-int if_ge 3 -8 1
                Passed
                Running ./math-int if_ge -5 5 0
                Passed
                Running ./math-int if_ge -20 10 0
                Passed
                Running ./math-int if_eq 21 21 1
                Passed
                Running ./math-int if_eq 30 18 0
                Passed
                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
                Passed
                Running ./math-int if_lt -20 3 1
                Passed
                Running ./math-int if_lt 15 3 0
                Passed
                Running ./math-int if_le 20 25 1
                Passed
                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
                Passed
                Running ./math-int if_le 10 -20 0
                Passed
                Running ./math-int if_ne 10 9 1
                Passed
                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
                Passed
                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
                Passed
                Running ./math-int rotl 1 32 1
                Passed
                Running ./math-int rotl -1 5 -1
                Passed
                Running ./math-int rotl 4096 23 8
                Passed
                Running ./use-host-ptr 10
                Passed
                Running ./vec-load
                Passed
                71 passes, 0 fails
                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
                Thanks!!

                Jason

                Comment


                • #23
                  Hi, I'm trying to replicate the opencl-example test on gentoo - I've got llvm, mesa, libclc, libdrm all built from the x11 overlay (running on 3.8.5 kernel), and the opencl-example seems to compile okay, but when I run it I get gpu lockups for each test (and if I was running X at the time, the whole machine becomes locked up).

                  This is on A8-5600K (aruba) - is this chip supported at this time, or any other hints for what to look at?

                  Comment


                  • #24
                    Originally posted by BradN View Post
                    Hi, I'm trying to replicate the opencl-example test on gentoo - I've got llvm, mesa, libclc, libdrm all built from the x11 overlay (running on 3.8.5 kernel), and the opencl-example seems to compile okay, but when I run it I get gpu lockups for each test (and if I was running X at the time, the whole machine becomes locked up).

                    This is on A8-5600K (aruba) - is this chip supported at this time, or any other hints for what to look at?
                    Aruba is not very well supported yet. You need to disable virtual memory in mesa to avoid lockups. I'm hoping to look into this in the next few weeks.

                    Comment

                    Working...
                    X