0

Question 01:

Does the use of data storage in constant memory provides any benefit over texture in the Pascal architecture if the data request frequence is very high among threads (every thread pick at least one data from a specific column)?

Question 02:

If every thread in a warp request in the very same instruction data from constant memory, but every every thread request it from a different address (no broadcasting), the performance will be worse than the texture memory?

Question 03:

Does the cache for constant memory and texture have the same performance? Do they both have similar dimensions? Can I manipulate the cache dimension for constant or texture on Pascal architecture?

Background:

There is a portion in a kernel that is sure to request some float data from a specific column of a 2D matrix in the texture memory, usually, every thread request the data stored in adjacent cell "below" the requested data from the previous thread.

The frequence of which two threads in the same warp request the very same address if bellow 25% for most warps, but can reach 50% in a less than 10% of the warps.

It is sure that this specific column fits cmem for 95% of the cases.

einpoklum
  • 118,144
  • 57
  • 340
  • 684
Thiago Conrado
  • 726
  • 8
  • 15
  • 3
    If you satisfy the expectations for constant memory usage, I'm sure that using constant memory is a good idea in the general case. It is allowing your code to take advantage of an additional cache mechanism provided by the GPU hardware, and in so doing putting less pressure on the usage of texture by other parts of your code. Your second to last sentence makes it sound like you are not really satisfying the expectations for constant memory/cache usage. In that case, the benefit is doubtful. This should be something you can compare and test for yourself, however. – Robert Crovella Sep 13 '17 at 14:23
  • Dear @RobertCrovella, thanks for your explanation, I do still have some doubts, so I edited my post and added 2 questions for a better clarifications. – Thiago Conrado Sep 14 '17 at 14:21
  • 1
    questions 2: Yes, in that case the performance for using the constant cache will be worse than if you used texture. Question 3: no, they don't have the same performance. This has been already indicated. No, they don't have similar dimensions. No you cannot manipulate the dimensions. It's not helpful or clarifying to put 5 or more questions in a single question on SO. It makes your "question" difficult for anyone to answer. [SO encourages one question per question](https://meta.stackexchange.com/questions/222735/can-i-ask-only-one-question-per-post). – Robert Crovella Sep 16 '17 at 21:43
  • Thanks for your help, I'll splitt the question.. the 1st one is here, please fell free to take a look and correct me as necessary. https://stackoverflow.com/questions/46290430/when-should-texture-memory-be-prefered-over-constant-memory/46290431#46290431 – Thiago Conrado Sep 19 '17 at 01:31

0 Answers0