Ask Your Question
0

First CUDA Call Takes Over 45 Seconds

asked 2013-04-05 12:04:12 -0600

Constantin S gravatar image

All, the title describes my problem. I know the that the first CUDA call initializes a ton of CUDA contexts, but on my CARMA Devboard this takes over 45 second. The first call to a cv::gpu::Mat which actually constructs the memory blocks for a very long time.

  1. Is this normal?
  2. Is there a way to speed it up? Is this caused by JIT compiling cuda object files?

Thank you

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2013-04-05 13:07:50 -0600

Vladislav Vinogradov gravatar image

You can compile CUDA code only for one compute capability. It will decrease output size of library and probably load time. Set next CMake variables:

CUDA_ARCH_BIN=2.1(2.0) # this means compute capability 2.1 with 2.0 instruction set
CUDA_ARCH_PTX=""       # empty string, do nou generate ptx code
edit flag offensive delete link more

Question Tools

Stats

Asked: 2013-04-05 12:04:12 -0600

Seen: 324 times

Last updated: Apr 05 '13