1) Install Catalyst 8.12 - since there's no .deb yet I installed it directly
2) Grab the Stream SDK
3) Run the cal and Brook installer. Both will try to install RPMs.
While the license dialog is displayed one can copy the amdcal and amdbrook dirs from /tmp to another place. Since rpm won't be able to fulfill the dependencies, the installer will fail, so you may abort it as well.
4) apt-get install alien
5) alien amdstream-brook-1.3.0_beta-1.i386.rpm will generate a .deb for you
6) alien amdstream-cal-1.3.0_beta-1.i386.rpm and another .deb
7) dpkg -i amdstream-brook-1.3.0_beta-1.i386.deb
8) dpkg -i amdstream-cal_1.3.0_beta-2_i386.deb
9) add /usr/local/amdbrook/sdk/lib/ to /etc/ld.so.conf
10) sudo ldconfig
11) the stuff will be in /usr/local/amdcal and /usr/local/amdbrook
12) edit /usr/local/amdbrook/sdk/include/brook/CPU/brtvector.hpp remove the static from line 188: #define SPECIALGETAT(TYP) template <> static TYP GetAt (const TYP& in,int UNUSED(i)) {return in;} (found that solution here)
13) add #define INT_MIN (1<<31) and #define INT_MAX ((1<<31)-1) to /usr/local/amdbrook/samples/CPP/common/util.cpp
Note that you need to start the binaries from X or you'll get a device open fail. Cost me several minutes to notice that while trying to start them via ssh. Opened a screen via vncviewer and attached it via ssh. Works fine now.
I guess that's all. Finally I was able to compile the apps in /usr/local/amdbrook/samples/CPP/apps
The binaries will be in /usr/local/amdbrook/samples/bin/CPP/lnx_x86_32
Tried double_precision_optimized_matmult (which probably does double precision matrix multiplication) -t -p -x 1024 -y 1024 -i 20
I get locking assertion failures, but it seems to run nevertheless.
Locking assertion failure. Backtrace:
#0 /usr/lib/libxcb-xlib.so.0 [0xb7a877c7]
#1 /usr/lib/libxcb-xlib.so.0(xcb_xlib_lock+0x2e) [0xb7a8796e]
#2 /usr/lib/libX11.so.6 [0xb7acf619]
#3 /usr/lib/libX11.so.6(XFreeGC+0x26) [0xb7aa9ff6]
#4 /usr/lib/libX11.so.6(XCloseDisplay+0x5f) [0xb7aa31ff]
#5 /usr/lib/libamdcaldd.so [0xb463547a]
#6 /usr/lib/libamdcaldd.so [0xb46420d5]
#7 /usr/lib/libamdcalrt.so(calInit+0x81) [0xb7b9be11]
#8 /usr/local/amdbrook/sdk/lib/libbrook.so(_ZN10CALRuntime10initializeEv+0x18) [0xb7ea5930]
#9 /usr/local/amdbrook/sdk/lib/libbrook.so(_ZN10CALRuntime6createEv+0x45) [0xb7ea5c41]
#10 /usr/local/amdbrook/sdk/lib/libbrook.so(_ZN5brook7Runtime11getInstanceEv+0xaf) [0xb7e9a777]
#11 ./double_precision_optimized_matmult [0x8052b15]
#12 ./double_precision_optimized_matmult [0x8051220]
#13 ./double_precision_optimized_matmult [0x805381a]
#14 /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe5) [0xb7bd1685]
#15 ./double_precision_optimized_matmult(__gxx_personality_v0+0x89) [0x8049dc1]
But I also get tons of GFLOPs :-]
Width Height Iterations GPU Total Time Gflops
1024 1024 20 2.194 18.2315
-p Compare performance with CPU.
Width Height Iterations CPU Total Time GPU Total Time Gflops Speedup
1024 1024 20 380.641 2.194 18.2315 173.492
(CPU: AMD 6400+ X2, GPU: Gainward Radeon HD4870GS (currently at normal clock))
Also tried to compile the basic example from /usr/local/amdcal/samples/tutorial/basic
Had to add #include <string.h> (for memset) and #include <stdlib.h> (for exit)
Also changed main(CALint argc, CALchar** argv) to main(int argc, char **argv)
One probably has to do the same for the other apps to compile.
Now let's try to write an app.
No comments:
Post a Comment