# How to setup "function cache configuration"?

**URL:** <https://forums.developer.nvidia.com/t/how-to-setup-function-cache-configuration/286477>\
**Category:** Nsight Compute\
**Created:** [March 19, 2024, 2:29am UTC](https://forums.developer.nvidia.com/t/how-to-setup-function-cache-configuration/286477 "2024-03-19T02:29:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![202476410arsmart](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@202476410arsmart](https://forums.developer.nvidia.com/u/202476410arsmart)\
**Post date:** [March 19, 2024, 2:29am UTC](https://forums.developer.nvidia.com/t/how-to-setup-function-cache-configuration/286477/1 "2024-03-19T02:29:53Z")

</div>

cudaFuncSetAttribute(my\_kernel, cudaFuncAttributePreferredSharedMemoryCarveout, 61);

I uses this, because I am in A100 and I want 100KB shared memory and 64KB L1, so I set it as 61%(100/164)

But I still see this in my ncu(2023.03 version) : CachePreferNone

Why?

---

<div class="post-metadata">

**Author:** ![202476410arsmart](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@202476410arsmart](https://forums.developer.nvidia.com/u/202476410arsmart)\
**Post date:** [March 19, 2024, 2:34am UTC](https://forums.developer.nvidia.com/t/how-to-setup-function-cache-configuration/286477/2 "2024-03-19T02:34:03Z")

</div>

Well, although maybe compiler will automatically do it for me, I guess…I uese NCU and see in occupancy calculator, it is 100KB for shared memory. But that does not explicitly show my! kernel is using this clever 100-64KB split and I feel not that comfortable…

---

<div class="post-metadata">

**Author:** ![veraj](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/veraj/32/256893_2.png) [@veraj](https://forums.developer.nvidia.com/u/veraj)\
**Post date:** [July 22, 2024, 12:00am UTC](https://forums.developer.nvidia.com/t/how-to-setup-function-cache-configuration/286477/3 "2024-07-22T00:00:17Z")

</div>

Closed on July 22, 2024, 12:00am UTC

This topic was automatically closed after 12 days. New replies are no longer allowed.
