Wednesday, November 26, 2008

Yes, I can (not)!

หลังจากงมอยู่กับ streams มาเนิ่นนาน ในที่สุดเราก็เขียน array addition with streams ได้สำเร็จ
After I got confused with streams on CUDA for so long, I finally could debug my code of array addition with streams.

It was just the Grid size that made me got the wrong answers. It was different from the sample code called simpleStreams, that I tried to imitate, which the grid size was defined by (array_size / (nstreams * block_size)) because it was an array initialization. When I drew some pictures to express the idea behind it, I found that it should be different. In my code, it was supposed to be (array_size / block_size) because I put two arrays added together and I had already defined the position of each element as well.

Next step... try to measure the execution time. That would for sure not be as puzzle as this step. :)

อ้าว! เวงละ...พอเอาขึ้น 8800 กับ Tesla ดันไม่ได้ซะงั้น
เอาใหม่ๆ


No comments:

Post a Comment