some questuons: __noinline__

hello.
i have a large device function that i call 2 times.
if i make just one call - i get 672 bytes lmem usage.
but if i call it two times i get 704 bytes lmem usage and two times performance lost.

what is noinline ? could it helps me to reduse local memory usage if i call nonilnine function twice or more times ?

can noinline help me to reduse total instruction number of my code?

thanks.

It is worth trying, I think. And it’s not that hard to try — just insert noinline and recompile kernel… much simpler and faster than posting question here :)

And it’s pretty normal that replicating function call increases register usage; I’ve seen this in most of my kernels.

"And it’s not that hard to try — just insert noinline and recompile kernel… much simpler and faster than posting question here "

no it is not so simple. “Pointer parameters must be inlined, so overriding noinline attribute on …” and i have some outher problems with refs. I use reference on objects sizeof which more than 32. so i even can not transfer them by value.

and i don’t want to use global variables in shared memory to transfer arguments.

i think i could do some thing like

int flag = 0;

while(flag != 2):

{

    if(flag==0)

     { a = ...; b = ....; }

   else if(flag==1)

      { a = ...; b = ....;} 

  

  func(a,b);

  flag++;

}

but i don’t want to write so horrible things.

and i am thinking - “how to keep back lmem usage growth” ?