Announcement
Collapse
No announcement yet.
AMD Radeon R600 GPU LLVM 3.3 Back-End Testing
Collapse
X
-
Originally posted by kernelOfTruth View Postperhaps cuda_memtest gives some meaningful output ?
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
-
Originally posted by jasn View PostThanks 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
-
Thanks Tom..
Originally posted by tstellar View PostIf 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.
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
Originally posted by tstellar View PostAll of the code in my bfgminer branches has been pushed upstream, so everything should work fine with the gentoo overlay.
Jason
Comment
-
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
Jason
Comment
-
Originally posted by jasn View PostThank 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
Jason
Comment
-
Originally posted by tstellar View PostThe 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
-
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
Thanks Tom!
Jason
Comment
-
Originally posted by jasn View PostNo 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
Thanks Tom!
Jason
Comment
-
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
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
Thanks..
Jason
Comment
Comment