Can I change L2 persistancy during kernel?

Hi! I am trying to let some block to store value persistant in L2, after they use these values, I would like to evict them, and let other blocks to store other value in L2.

Theoretically, if new values are more frequently used, they might evict old value out, but seems not very efficient… Can I obviously do this using some API within the kernel? Thanks!!

Yes, subject to Cuda >=11.0 and SM >= 8.0, details here.

Thank you! I know this, but seems this is outside of the kernel? My requirement is like, firstly several blocks and then other blocks. If set the property outside of the kernel, my requirement can not be fulfilled?

Apologies, I wasn’t paying enough attention. As in-kernel setup isn’t mentioned in the Guide, I guess it’s not possible.

1 Like

Agree… I guess so… Thanks!