cancel
Showing results for 
Search instead for 
Did you mean: 

OpenCL

boxerab
Challenger

Strange memory side-effect on HD 7700

Jump to solution

By chance, I created a device buffer for my kernel, but did not access it.

The creation of this unused buffer changed the performance of my kernels.

The size of the buffer was small.

Is this a bug in the driver perhaps? I am using the latest crimson driver,

on windows 7 64 bit.

0 Kudos
Reply
1 Solution

Accepted Solutions
tzachi_cohen
Staff
Staff

Re: Strange memory side-effect on HD 7700

Jump to solution

It is probably due to virtual addresses assigned to these one byte buffers. On one occasion the virtual addresses of these buffers lead them to evenly distribute between the GPU memory channels and on the other occasion some buffers are assigned to the same memory channel and access to them is being serialized.

This behavior may change between one GPU to the other as each GPU has a different number of channels and a slightly different memory configuration.

Tzachi

View solution in original post

0 Kudos
Reply
5 Replies
boxerab
Challenger

Re: Strange memory side-effect on HD 7700

Jump to solution

Update: it looks like it is the number of buffers allocated. If I keep allocating 1 byte buffers that do not get used,

then the perf goes up and down:  add one buffer and the per goes up, add a second and it goes back to where it

was before, add a third buffer and it goes up, add a fourth and it goes back to where it was, etc.

Very odd.

0 Kudos
Reply
tzachi_cohen
Staff
Staff

Re: Strange memory side-effect on HD 7700

Jump to solution

It is probably due to virtual addresses assigned to these one byte buffers. On one occasion the virtual addresses of these buffers lead them to evenly distribute between the GPU memory channels and on the other occasion some buffers are assigned to the same memory channel and access to them is being serialized.

This behavior may change between one GPU to the other as each GPU has a different number of channels and a slightly different memory configuration.

Tzachi

View solution in original post

0 Kudos
Reply
boxerab
Challenger

Re: Strange memory side-effect on HD 7700

Jump to solution

תודה רבה

Tzachi, so will this apply to a whole family of GPUs, i.e. will all Capeverde GPUs exhibit this behaviour?

Also, since it was so easy for me in userland to dramatically change performance, would it not make sense to

modify the driver so that it better managed mapping virtual memory addresses to GPU memory channels?

Is this topic discussed anywhere, so I can learn more?

0 Kudos
Reply
nibal
Challenger

Re: Strange memory side-effect on HD 7700

Jump to solution

boxerab wrote:

תודה רבה

Tzachi, so will this apply to a whole family of GPUs, i.e. will all Capeverde GPUs exhibit this behaviour?

Also, since it was so easy for me in userland to dramatically change performance, would it not make sense to

modify the driver so that it better managed mapping virtual memory addresses to GPU memory channels?

Is this topic discussed anywhere, so I can learn more?

Yes, you can read all about memory optimization in the optimization guide. It affects all GCN cards. The more recent the card, usually, the more channels it has to avoid collissions...

0 Kudos
Reply
boxerab
Challenger

Re: Strange memory side-effect on HD 7700

Jump to solution

Thanks. I will be upgrading next year to 300 or 400 series card, so hopefully this channel issue will be less of a problem. I am just happy that I

stumbled on this performance improvement (+ 20 % ).

0 Kudos
Reply