Seven Weapons of Cuda Optimization

Source: Internet
Author: User

To put it bluntly, I came to the company for an internship in July June as a researcher. Use CG to process previous imagesAlgorithmIt was rewritten on the GPU, and geforce8800gtx was used at that time. Later, I started to contact other jobs, learn X-ray and image acquisition. I just flipped through the manual and browsed the discussion in the Group when I was okay. In this casual day, I gradually forgot a lot of things. Now the project is restarted, and the Cuda path is also restarted.

There are not necessarily seven types of weapons.

Maybe it's just a codename. Maybe, this is imitating Gu Long ~

(1) stream

Stream

Stream stream.

There are countless streams flowing inside the invisible video card.

From main memory to global memory, stream [I] is in,

In SM, stream [I + 1] is busy with budget addition, subtraction, multiplication, and division,

At the same time, stream [I + 2] from global memory is also in.

Due to the existence of stream, the brothers on all fronts are busy at the same time. You are not fighting alone!

Everything seems to be too late. If there are too many streams, management is a problem. No, my 1024*1024 images, when 64 streams are opened, the performance is greatly reduced. Opening 4, 8, 16 seems to be okay.

This is what the manual says:

Set T1 = execution time of Kernel

T2 = memory transfer time

N = number of streams

Time (using stream) = max (T1, T2) + min (T1, T2)/n.

It seems that it is still advantageous for large-scale data throughput.

However, my concern is:

Is it difficult to divide the stream for operations related to data locations such as convolution?

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.