Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

about ldg32_nc_0 #13

Open
YijiaZhao opened this issue May 13, 2022 · 3 comments
Open

about ldg32_nc_0 #13

YijiaZhao opened this issue May 13, 2022 · 3 comments

Comments

@YijiaZhao
Copy link

https://github.com/tpoisonooo/how-to-optimize-gemm/blob/master/cuda/MMult_cuda_12.cu: 20,21
I'm a beginner of CUDA&&PTX, I want to know what does these two PTX use for?
"{.reg .pred p;\n"
"mov.b32 %0, 0;\n"
is it useless code?

@tpoisonooo
Copy link
Owner

For .reg .pred p; yes it is useless. The code is originally used for predicate guard, to handle conditional execution.

mov.b32 %0, 0 is used for clean reg. If you do not like it, just remove it.

@tpoisonooo
Copy link
Owner

@YijiaZhao
Copy link
Author

thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants