einpoklum
einpoklum

Reputation: 131646

cudaFuncSetCacheConfig - applies to all devices or current device?

If I call the cudaFuncSetCacheConfig function (which chooses whether I prefer more L1, more shared memory or equal amounts - on Kepler and Maxwell devices) - does it apply to launches of that kernel on all devices on my system, or just the currect one? (API reference doesn't really say)

Upvotes: 0

Views: 544

Answers (1)

talonmies
talonmies

Reputation: 72349

The cache configuration is a property of the function, not the device. When you call cudaFuncSetCacheConfig you are setting it for the module in which the function is contained, and it should then apply to all device contexts into which that module is used.

[This answer assembled from comments and added as a community wiki entry to get this question off the unanswered queue for the CUDA tag]

Upvotes: 3

Related Questions