Skip to content

far-rainbow/python-opencv-cpu-cuda-bench

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

python-opencv-cpu-cuda-bench

Simple OpenCV CPU-ONLY vs. CUDA benchmark

important note

you have to build CUDA capable OpenCV module to start this benchmark
pip and Anaconda's conda/conda-forge/nvidia/intel channels has cpu-only versions yet (!)

example benchmark output

ASUS TUF Gaming FX706LI-H705
Win10
15x15 conv blur matrix
3000 iterations

cv2._version_='4.5.4'
*** CUDA Device Query (Runtime API) version (CUDART static linking) ***

Device count: 1

Device 0: "NVIDIA GeForce GTX 1650 Ti"
CUDA Driver Version / Runtime Version 11.50 / 11.50
CUDA Capability Major/Minor version number: 7.5
Total amount of global memory: 4096 MBytes (4294639616 bytes)
GPU Clock Speed: 1.49 GHz
Max Texture Dimension Size (x,y,z) 1D=(131072), 2D=(131072,65536), 3D=(16384,16384,16384)
Max Layered Texture Size (dim) x layers 1D=(32768) x 2048, 2D=(32768,32768) x 2048
Total amount of constant memory: 65536 bytes
Total amount of shared memory per block: 49152 bytes
Total number of registers available per block: 65536
Warp size: 32
Maximum number of threads per block: 1024
Maximum sizes of each dimension of a block: 1024 x 1024 x 64
Maximum sizes of each dimension of a grid: 2147483647 x 65535 x 65535
Maximum memory pitch: 2147483647 bytes
Texture alignment: 512 bytes
Concurrent copy and execution: Yes with 2 copy engine(s)
Run time limit on kernels: Yes
Integrated GPU sharing Host Memory: No
Support host page-locked memory mapping: Yes
Concurrent kernel execution: Yes
Alignment requirement for Surfaces: Yes
Device has ECC support enabled: No
Device is using TCC driver mode: No
Device supports Unified Addressing (UVA): Yes
Device PCI Bus ID / PCI location ID: 1 / 0
Compute Mode:
Default (multiple host threads can use ::cudaSetDevice() with device simultaneously)

deviceQuery, CUDA Driver = CUDART, CUDA Driver Version = 11.50, CUDA Runtime Version = 11.50, NumDevs = 1

CPU TASK: 5.0984488
CUDA TASK: 1.6909807999999993

As you can see CUDA heavy task is nearly three times faster than CPU-ONLY

About

simple opencv cpu vs cuda benchmark

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages