Using device function can save register?

Hi! I heard this from my friend:
Using device function can make variable local, and might reduce the total register usage

Is that true?

Thank you!!

Without code and context this question is meaningless.

But based on the information supplied here I would strongly recommend relying on the CUDA related documentation, blog posts, tools, and example codes provided by NVIDIA, rather than the friend.

Being skeptical of any source is a healthy attitude, and sometimes conventional wisdom, or what is published in peer-reviewed journals or vendor-supplied documentation, is not (quite) accurate. Running well-designed experiments is a good insurance policy against such potential pitfalls.

1 Like