2008年7月27日 星期日

Fluoroscopy


這就是讓我拿來做實驗的機器阿~不是雙平面,整個大失望。問了一下,整間醫院都沒有雙平面。真是太弱了。
Posted by Picasa

2008年7月18日 星期五

Patello-Femoral Joint Replacement

昨天參觀了幾位合作醫師的人工膝關節置換手術過程,這是髕骨股骨關節置換,並不是人工全膝關節,算比較特別的研究,至少國內我們實驗室沒做。

最初的膝關節鬆弛度測試。
準備手術前,這就是人的膝關節打開後的樣子,這是右腳。如果注意看會發現,股骨內側有一點退化性關節炎。

切割結束,等著裝上人工關節。

一一安上。

完工!

切削過程中,我還被噴到,不過那些醫生已經噴得全身都是囉。真是辛苦了,骨科醫師們!
Posted by Picasa

2008年7月15日 星期二

利用NVidia CUDA 加速MATLAB運算

星期六早上去參加了旅英僑界運動會,認識了不少好朋友,也第一次聽說了NVidia的CUDA,可以用GPU運算!NV牌八系列以上的晶片組就可以用!我的F8SV完全OK阿!據說利用GPU可以大幅縮短MATLAB矩陣運算的時間,我聽了感覺很嗨!當然就投入研究看看囉!


但是想的比做的美,如果乖乖按照NV官網上的教學,我想我到現在還是無法使用吧?最後還是跟先進求救才搞定。就把這步驟記錄下來當作我BLOG的第一篇吧!

先介紹我的laptop
ASUS F8Sv
OS: VISTA 32bit
MATLAB R2008a

接著看看你的顯示卡是不是支援CUDA,底下是支援列表。

http://www.nvidia.com/object/cuda_learn_products.html


如果你有,恭喜!

安裝CUDA以前,先安裝第三方顯卡驅動。對,你沒看錯NV自家驅動會讓你安裝不了CUDA driver,夠鳥吧!
專家幫我找到屬於我的規格的最新趨動,連結如下
http://www.laptopvideo2go.com/nvidia/175series/17595_vista.exe
http://www.laptopvideo2go.com/infs/175series/17741_vista/nv_disp.inf

如果你跟我不一樣顯卡,自己從

http://www.laptopvideo2go.com/

去找吧!
INF檔是當EXE自解壓縮完成之後要丟進去替換掉的,這樣才能順利安裝。安裝前記得先移除原來的顯示卡驅動程式。


接著上NV官網找到CUDA
http://www.nvidia.com/object/cuda_home.html
去當漏區把該抓的三樣東西都抓一抓,驅動要第一個灌,上面的INF檔一樣要塞進來,不然不能順利安裝喔!
接著安裝另外兩個檔案toolkit&SDK
馬上就可以看看NV官方提供的GPU強大威力演示囉!

但是這還不夠,我要的是MATLAB的API阿!翻來找去,讓我找到了Jacket這個project,提供MATLAB用的
函示庫喔!不需要自己的撰寫C語言再用MEX function,真是爽阿。下載後,直接把Jacket提供的函式庫加進PATH就搞定了!

底下是BLAS範例執行的結果,我就不多做解釋了,自己看看有多威吧!

BLAS Example 1: Square Matrix Multiplication
Computing the 2x2 benchmark...
On average GPU is 0.177807 times faster than the CPU.
Computing the 4x4 benchmark...
On average GPU is 0.143623 times faster than the CPU.
Computing the 8x8 benchmark...
On average GPU is 0.135356 times faster than the CPU.
Computing the 16x16 benchmark...
On average GPU is 0.182954 times faster than the CPU.
Computing the 32x32 benchmark...
On average GPU is 5.28891 times faster than the CPU.
Computing the 64x64 benchmark...
On average GPU is 1.67258 times faster than the CPU.
Computing the 128x128 benchmark...
On average GPU is 4.13088 times faster than the CPU.
Computing the 256x256 benchmark...
On average GPU is 17.4282 times faster than the CPU.
Computing the 512x512 benchmark...
On average GPU is 139.496 times faster than the CPU.
Computing the 1024x1024 benchmark...
On average GPU is 990.547 times faster than the CPU.
Plotting results...End of BLAS Example 1.

BLAS Example 2: Matrix-Vector Multiplication (Transformation)
Computing the 3x1024 benchmark...
On average GPU is 1.60066 times faster than the CPU.
Computing the 3x2048 benchmark...
On average GPU is 4.33732 times faster than the CPU.
Computing the 3x4096 benchmark...
On average GPU is 13.9893 times faster than the CPU.
Computing the 3x8192 benchmark...
On average GPU is 3.1869 times faster than the CPU.
Computing the 3x16384 benchmark...
On average GPU is 5.72559 times faster than the CPU.
Computing the 3x32768 benchmark...
On average GPU is 8.04638 times faster than the CPU.
Computing the 3x65536 benchmark...
On average GPU is 26.1396 times faster than the CPU.
Computing the 3x131072 benchmark...
On average GPU is 31.8335 times faster than the CPU.
Computing the 3x262144 benchmark...
On average GPU is 71.517 times faster than the CPU.
Computing the 3x524288 benchmark...
On average GPU is 121.903 times faster than the CPU.
Computing the 3x1048576 benchmark...
On average GPU is 280.337 times faster than the CPU.
Plotting results...End of BLAS Example 2.

BLAS Example 3: Matrix-Vector Multiplication
Computing the 3x2 benchmark...
On average GPU is 0.0946142 times faster than the CPU.
Computing the 3x4 benchmark...
On average GPU is 0.0906896 times faster than the CPU.
Computing the 3x8 benchmark...
On average GPU is 0.0937124 times faster than the CPU.
Computing the 3x16 benchmark...
On average GPU is 0.0942915 times faster than the CPU.
Computing the 3x32 benchmark...
On average GPU is 0.0815369 times faster than the CPU.
Computing the 3x64 benchmark...
On average GPU is 0.107138 times faster than the CPU.
Computing the 3x128 benchmark...
On average GPU is 0.162368 times faster than the CPU.
Computing the 3x256 benchmark...
On average GPU is 0.365671 times faster than the CPU.
Computing the 3x512 benchmark...
On average GPU is 2.09458 times faster than the CPU.
Computing the 3x1024 benchmark...
On average GPU is 11.3481 times faster than the CPU.
Plotting results...End of BLAS Example 3.

BLAS Example 4: Sum Operation
Computing the benchmark for 8192 elements...
On average GPU is 0.818735 times faster than the CPU.
Computing the benchmark for 16384 elements...
On average GPU is 1.29138 times faster than the CPU.
Computing the benchmark for 32768 elements...
On average GPU is 2.45354 times faster than the CPU.
Computing the benchmark for 65536 elements...
On average GPU is 4.23906 times faster than the CPU.
Computing the benchmark for 131072 elements...
On average GPU is 9.45104 times faster than the CPU.
Computing the benchmark for 262144 elements...
On average GPU is 18.6068 times faster than the CPU.
Computing the benchmark for 524288 elements...
On average GPU is 37.1367 times faster than the CPU.
Computing the benchmark for 1048576 elements...
On average GPU is 92.3752 times faster than the CPU.
Computing the benchmark for 2097152 elements...
On average GPU is 149.387 times faster than the CPU.
Computing the benchmark for 4194304 elements...
On average GPU is 311.716 times faster than the CPU.
Plotting results...End of BLAS Example 4.



Posted by Picasa

2008年7月13日 星期日

My home!
Posted by Picasa