npages & shared memory in getf2_native_fused

Skip to first unread message

Aran Nokan

Nov 9, 2021, 6:11:43 PM11/9/21
to MAGMA User

I have two questions about the getf2_native_fused kernel.

1) As I understand it, you are dividing panels by row as some pages.
npages = magma_ceildiv(m, ntx);
Can I call the page a sub-matrix?
Here ntx is e.g. 512 so if the number of rows of the panel is 12000 and number of columns is 32 then we will have 24 pages (512x32). Is this deduction correct?

______                           ______
| xxxxx |                          | xxxxx |
| xxxxx |                          | xxxxx |
                 ---->               ---------
| xxxxx |                          | xxxxx |
                 ---->               ---------
| xxxxx |                          | xxxxx |
| xxxxx |                          | xxxxx |
 ______                          ______

Here I have used "---------" for showing the splitting panel by row.

Or we have 32 grids and each grid contains 24 pages? I think this one is correct, if so why we are not using the previous config  24 pages (512x32)?

I think In the original paper of this algorithm the number of columns is 8 or 16 and not 32.

2) As I see it, for working on each element of a page (sub-matrix!?) you have a register named "rA". For reading them from global memory we have this:

    for(int i = 0; i < NPAGES-1; i++){
        rA[i] = dA[ i * TX ];

What is the warp and threadblock configuration?

Why don't we read page elements to shared memory and we are trying to increase the pressure on the registers memory? 

Best regards,

Ahmad Abdelfattah

Nov 9, 2021, 9:46:08 PM11/9/21
to Aran Nokan, MAGMA User
The kernel assigns one column per thread-bock. The number of columns can be 8, 16 or 32. We can modify our software after publishing the paper :)

If the #rows = 12000, and using 512 threads, then we need ceiling(12000/512) = 24 pages. The panel is distributed by column across thread-blocks, and each column is stored across 512 threads using the register variable rA[24]. 

The register file is larger than shared memory, so we can use it to cache more data. 


You received this message because you are subscribed to the Google Groups "MAGMA User" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit

Reply all
Reply to author
0 new messages