cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

Lev
Journeyman III

How to setup register usage by kernel?

Is there equivalent to cuda maxregcount in opencl?

 

Subject, how can I setup register usage by kernel? Also, am I right that Evegreen has 16000 vector registers in each SIMD?

And what is maximum number of concurent work groups per SIMD engine?

 

 

 

0 Likes
5 Replies

Lev,
The maximum number of concurrent work-groups is determined by resource usage. This includes number of registers, amount of LDS space and number of threads per work group. There is no way to directly specify the number of registers used by a kernel. Each SIMD has 64 wide register file with each column having 256 x 32 x 4 registers.
0 Likes

Thanks.

So register allocation is handled automaticaly. Programmer does not need to worry. And what is the place of register spilling? Is it global memory like on Geforce? If I specify for example 256 group size with 100 registers in each thread,   I will run out of register file.

0 Likes

Lev,
The GPU compiler will spill registers to memory if your domain size or register pressure are too high. This is a bad thing and if this happens then you need to redesign your algorithm to use less registers or use a smaller group size.
0 Likes

And how can I obtain information about spilling registers? Via stream kernell analizer? And I think I am correct that maximum register number per work item is 256, am I?

0 Likes

Yes via SKA, they are called Scratch Registers in the ISA
0 Likes