Coder Social home page Coder Social logo

cuda-learning's People

Contributors

dzhoshkun avatar

Stargazers

 avatar

Watchers

 avatar

cuda-learning's Issues

Benchmark a CIELAB color conversion pipeline

Description

The following steps are a possible way to make video data available for GIFT-Grab-supported pipelines processing images on the GPU using the CIELAB color space using NVIDIA Performance Primitives (NPP):

  1. Capture image data in I420 color format
  2. Copy data from host to device
  3. Convert I420 data to BGR format
  4. Convert BGR data to CIELAB format
  5. Do process data
  6. Convert CIELAB data to BGR format
  7. Convert BGR data to I420 format
  8. Copy data from device back to host

The indirect conversions are because currently no direct conversion is supported by NPP.

Aim

The performance of this pipeline should be assessed by measuring the time it takes to perform steps 2, 3, 4, 6, 7, and 8 so as to know how much time is left for step 5 in a pre-defined frame rate configuration.

Variables

  • Image resolution in step 1
  • Capture time in step 1
  • Used GPU
  • CUDA version
  • Frame rate

GTX 980 Ti has twice the bandwidth of TITAN X?

Following the NVIDIA article on optimizing data transfers, when I run the bandwidthtest application, I get the following output on Adelie:

(ssh) dzhoshkun@gift-adelie ‹ master ● › : ~/ws/code-samples/series/cuda-cpp/optimize-data-transfers
[0] % CUDA_VISIBLE_DEVICES=0 ./bandwithtest 

Device: GeForce GTX TITAN X
Transfer size (MB): 16

Pageable transfers
  Host to Device bandwidth (GB/s): 5.442285
  Device to Host bandwidth (GB/s): 6.198576

Pinned transfers
  Host to Device bandwidth (GB/s): 6.114146
  Device to Host bandwidth (GB/s): 6.509175


(ssh) dzhoshkun@gift-adelie ‹ master ● › : ~/ws/code-samples/series/cuda-cpp/optimize-data-transfers
[0] % CUDA_VISIBLE_DEVICES=1 ./bandwithtest 

Device: GeForce GTX 980 Ti
Transfer size (MB): 16

Pageable transfers
  Host to Device bandwidth (GB/s): 7.783488
  Device to Host bandwidth (GB/s): 11.366924

Pinned transfers
  Host to Device bandwidth (GB/s): 12.176038
  Device to Host bandwidth (GB/s): 12.547878

Why should a TITAN X have half the bandwidth of a GTX 980 Ti?

Compare kernel throughput to peak theoretical throughput

The CUDA performance guidelines state:

comparing the floating-point operation throughput or memory throughput - whichever makes more sense - of a particular kernel to the corresponding peak theoretical throughput of the device indicates how much room for improvement there is for the kernel.

  • select a number of typical kernels (for instance from typical CUDA examples)
  • choose a GPU to run these on
  • measure the corresponding throughput for each kernel
  • compare the throughput to the corresponding theoretical peak throughput
  • try to increase the throughput by changing the implementation

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.