OpenCL for Cell
OpenCL for Cell
This is great news! Cell now supports opencl. I installed the OpenCL Development Kit in my ps3. The Julia set sample outputs to the ps3 framebuffer with minor modifications to the Makefile.
Here is a link to the IBM website.
http://www.ibm.com/developerworks/forum ... 8&tstart=0
Here is a link to the IBM website.
http://www.ibm.com/developerworks/forum ... 8&tstart=0
The packages posted in the IBM website support the PS3 as well. The IBM BladeCenter QS22 has 2 cell processors inside. The software is compatible with the PS3. You have to install the cell sdk prior to installing the opencl sdk.rapso wrote: I wonder if that will be also part of the cell sdk for ps3, just seen IBM server support so far.
Well...
I installed the OpenCL rpms succesfully on my system...
But when I try executing the samples I get the following errors :
I tried to tweak the .cl code, but still not working. Any idea of what's going wrong ? :/
I installed the OpenCL rpms succesfully on my system...
But when I try executing the samples I get the following errors :
Code: Select all
[root@ramen ppc]# make clean
[root@ramen ppc]# make
gcc -I. -g -O3 -m32 -DPPM=0 -c -o julia_ocl.o ../src/julia_ocl.c
gcc -I. -g -O3 -m32 -DPPM=0 -c -o clock.o ../src/clock.c
gcc -I. -g -O3 -m32 -DPPM=0 -c -o ps3.o ../src/ps3.c
gcc -lCL -lnetpbm -m32 -lm -lstdc++ julia_ocl.o clock.o ps3.o ../src/ppm_util.h -o julia_ocl
cp -f ../src/julia_kernel.cl .
[root@ramen ppc]# ./julia_ocl
Device: "ACCELERATOR CellBE processor"
Loading program source 'julia_kernel.cl'....
Error Log -- ERROR: no valid __kernel function found in source
[root@ramen ppc]#
I had similar issues at the beginning. I believe the IBM XL Compiler for OpenCL is not installed properly. Installing the rpms located in the iso is not enough. You have to run the xlc_install (bash script) for proper installation. The only problem is the script checks for Fedora 7 or Red Hat Enterprise 5 installations before running.
My work around was to copy all the files from the iso to the local hard drive. Edit xlc_install and change lines number 56 and 82 to the following:
56. local ($cmpFixVer) = "0.1.0-0";
82. local (%cmp_pkgs) = &get_package_names ($prod, "$cmpVer$cmpFixVer");
Run the local copy of xlc_install and you should get this output on the screen.
My work around was to copy all the files from the iso to the local hard drive. Edit xlc_install and change lines number 56 and 82 to the following:
56. local ($cmpFixVer) = "0.1.0-0";
82. local (%cmp_pkgs) = &get_package_names ($prod, "$cmpVer$cmpFixVer");
Run the local copy of xlc_install and you should get this output on the screen.
Code: Select all
----------------------------------------------------------------------------
Starting IBM XL C for OpenCL for Multicore Acceleration for Linux
Installation Script
----------------------------------------------------------------------------
[Stage 1] Validating ./images-ppc/rpms/ Directory
INFORMATIONAL: -------- 0
Checking "opencl-xlc-lic--.ppc64.rpm" in "./images-ppc/rpms" .. (FAILED)
WARNING: opencl-xlc-lic ... OK to miss
[Stage 1] Validating ./images-ppc/rpms/ Directory ----- (PASSED)
----------------------------------------------------------------------------
----------------------------------------------------------------------------
[Stage 2] Checking System Pre-requisites
[Stage 2] Checking System Pre-requisites ----- (PASSED)
----------------------------------------------------------------------------
----------------------------------------------------------------------------
[Stage 3] Retrieving installed XL compiler(s) info
[Stage 3] Retrieving installed XL compiler(s) info ----- (PASSED)
----------------------------------------------------------------------------
----------------------------------------------------------------------------
[Stage 4] Confirming to proceed with this installation
[Stage 4] Confirming to proceed with this installation ----- (PASSED)
----------------------------------------------------------------------------
----------------------------------------------------------------------------
[Stage 5] Uninstalling previous installations
No packages to be uninstalled.
[Stage 5] Uninstalling previous installations ----- (PASSED)
----------------------------------------------------------------------------
----------------------------------------------------------------------------
[Stage 6] Installing "XL C for OpenCL for Multicore Acceleration for Linux"
Version -0.1.0-0
Preparing...
##################################################
opencl-xlc-cmp
##################################################
Warning: already exists
opencl-xlc-man
##################################################
opencl-xlc-rte
##################################################
opencl-xlc-lib
##################################################
opencl-xlc-help
##################################################
opencl-cell-xlc-lib
##################################################
opencl-cell-xlc-cmp
##################################################
opencl-xlc-rte-lnk
##################################################
[Stage 6] Installing "XL C for OpenCL for Multicore Acceleration for Linux"
Version -0.1.0-0 ----- (PASSED)
----------------------------------------------------------------------------
----------------------------------------------------------------------------
[Stage 7] Configuring "XL C for OpenCL for Multicore Acceleration for Linux"
----- (PASSED)
----------------------------------------------------------------------------
----------------------------------------------------------------------------
[Stage 8] Creating symbolic links to "/usr/bin"
Do you want to create symbolic links for the "IBM XL C for OpenCL for
Multicore Acceleration for Linux" compiler invocations in the "/usr/bin"
location?
By accepting to create the symbolic links, the links below will be
created. Any existing "IBM XL C for OpenCL for Multicore Acceleration for
Linux" compiler invocations in the "/usr/bin" will be removed before the
links are created.
Link Source
=============== ====================
/usr/bin/xlcl /opt/ibmcmp/xlc/opencl/0.1/bin/xlcl
/usr/bin/ppu-xlcl /opt/ibmcmp/xlc/opencl/0.1/bin/ppu-xlcl
/usr/bin/spu-xlcl /opt/ibmcmp/xlc/opencl/0.1/bin/spu-xlcl
=============== ====================
Do you want to proceed with the symbolic links?
Please type "yes" or "no":
Symbolic links are created.
[Stage 8] Creating symbolic links to "/usr/bin" ----- (PASSED)
----------------------------------------------------------------------------
----------------------------------------------------------------------------
"IBM XL C for OpenCL for Multicore Acceleration for Linux" Version -0.1.0-0
has been successfully installed.
To learn about setting up your environment with "IBM XL C for OpenCL for
Multicore Acceleration for Linux", refer to the Installation Guide.
Installation Completed.
OpenCL
Applied edits to xlc_install file, which must be named xlc_install, and all the OpenCL examples worked. The julia_ocl --ps3 must have more than 4M of frame buffer memory.
BlackScholes and Perin-noise also worked using the default settings.
BlackScholes and Perin-noise also worked using the default settings.
Well, the Julia set example provided in the samples is a good reference. It generates 50 frames in 1.92 sec. The frames are 512x512 in size. So we’re talking roughly at about 26 frames per seconds. I consider this real time.
I believe one of the samples in Mac OS produces Julia sets as well. I don’t have a Mac. Someone with a Mac OS could post the performance under that platform.
Couple of tips under the PS3:
julia_ocl –-ps3 --accel -i 500 // will give you about 25 secs of animation
Julia_ocl –b –-ps3 accel –i 500 // loads from binary source (faster)
I believe one of the samples in Mac OS produces Julia sets as well. I don’t have a Mac. Someone with a Mac OS could post the performance under that platform.
Couple of tips under the PS3:
julia_ocl –-ps3 --accel -i 500 // will give you about 25 secs of animation
Julia_ocl –b –-ps3 accel –i 500 // loads from binary source (faster)
I wrote my first program in OpenCL. The program queries the OpenCL environment.
Here is a link to my website where you can download the program
http://home.earthlink.net/~carlos_neto/
Enjoy!
Carlos
Here is a link to my website where you can download the program
http://home.earthlink.net/~carlos_neto/
Enjoy!
Carlos
can you mail me the julia code ( I guess it's part of the opencl sdk from ibm?) I will try to get it running on the gtx260 here.
[email protected]
thx in advance
[email protected]
thx in advance
ok, i got the apple juliaset demo source and ported it to win32, i had to outcomment most of the opengl part, so i've no prove yet that everything works fine, but it was just a 20min lunch-time hack-port (and stepping through the loading, init and compute part does not show any obvious errors).
gfx card is gtx260:
framerate is between 250 and 280fps, most time around 260fps
edit:
could you tweak the kernel size and check if that affects the performance, please? from cuda I know this has usually quite a big impact. I've tested various "WorkGroupItems" and setting it to 64 gave ~330fps.
thx in advance!
gfx card is gtx260:
framerate is between 250 and 280fps, most time around 260fps
edit:
could you tweak the kernel size and check if that affects the performance, please? from cuda I know this has usually quite a big impact. I've tested various "WorkGroupItems" and setting it to 64 gave ~330fps.
thx in advance!
IBM OpenCL Forum
If you have questions about the IBM OpenCL Development Kit, you can post your questions to the IBM OpenCL forum
http://www.alphaworks.ibm.com/tech/opencl/forum
You should get your questions answered quicker.
http://www.alphaworks.ibm.com/tech/opencl/forum
You should get your questions answered quicker.
I noticed the IBM website has updated the OpenCL developoment kit for the cell processor. The newer version installs just fine in my PS3.
For those of you who followed this tread from the beginning, there is a minor change to the above instructions. When you edit the xlc_install script, use the following parameters for lines 56 and 82:
56.local ($cmpFixVer) = "0.1.1-0";
82. local (%cmp_pkgs) = &get_package_names ($prod, "$cmpVer$cmpFixVer");
The rest of the instructions are identical.
I run my opencl_info program on this version and I can see IBM is starting to implement device extensions.
I posted a copy of the generated output in my website.
For those of you who followed this tread from the beginning, there is a minor change to the above instructions. When you edit the xlc_install script, use the following parameters for lines 56 and 82:
56.local ($cmpFixVer) = "0.1.1-0";
82. local (%cmp_pkgs) = &get_package_names ($prod, "$cmpVer$cmpFixVer");
The rest of the instructions are identical.
I run my opencl_info program on this version and I can see IBM is starting to implement device extensions.
I posted a copy of the generated output in my website.