Ask Your Question

pixelhead's profile - activity

2015-02-19 17:27:01 -0600 received badge  Nice Question (source)
2014-06-10 21:12:53 -0600 received badge  Student (source)
2014-06-10 19:24:56 -0600 asked a question StereoBM CPU vs CUDA vs OpenCL Performance

Hi -

I'm wondering if anyone has similar experience with StereoBM with a mobile GPU. I ran StereoBM on a 640x512 image pair, with a 9x9 window, and for 128 disparities. Tested with a CPU, CUDA, and OpenCL versions on i7, GTX780, and K4000M. All times include memory transfers and GPU warm up times were removed.

  • Core i7: 6.368 msec
  • GTX780: OCL: 3.2 msec
  • GTX780: CUDA: 5.3 msec
  • K4000M: OCL: 10.3 msec
  • K4000M: CUDA: 12.4 msec

Two trends that were a bit surprising:

  1. notebook ran slower
  2. OpenCL ran faster than CUDA

Just wondering if any had some insights. For #1, SSE and highly optimized code proves to be the difference? For #2, the basic code for CUDA and OCL implementations look equivalent so it is just the OCL compiler doing something different? Or does this mean that the CUDA implementation could be further optimized?

Thanks

2014-03-03 18:04:57 -0600 asked a question Building v2.4.8 32-bit with VS2012 Express uses link path to x64

Hi -

OpenCV is a great library and I wanted to just pass along some info I found trying to build OpenCV 2.4.8 using VS2012 Express with CUDA 5.5. I tried building x64 but it seems CUDA 5.5 doesn't support 64-bit for VS2012 Express (nvcc did not recognize the visual studio version).

So I reran cmake using the 32-bit Visual Studio 11 Generator and unchecked CUDA_64_BIT_DEVICE_CODE to use the Win32 CUDA runtime. However, the link paths to the CUDA libraries still remained at the lib/x64/ paths. I manually edited them to point to lib/Win32 and succesfully compiled.

Poking around the FindCUDA.cmake file, it appears the 'cuda_find_library_local_first_with_path_ext' macro (line 799) doesn't take into account the CUDA_64_BIT_DEVICE_CODE flag when using 'find_library'.

Hope this helps.