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

Make fast-path hooks inline #182

Open
minsii opened this issue Apr 28, 2021 · 2 comments
Open

Make fast-path hooks inline #182

minsii opened this issue Apr 28, 2021 · 2 comments
Assignees

Comments

@minsii
Copy link
Collaborator

minsii commented Apr 28, 2021

Current backend defines all hooks as function pointer. Some hooks are accessed at fast-path or accessed multiple times in a single ipack/iunpack call. Compiler cannot optimize much for function pointers. We want to make these "fast" hooks inline.

@pavanbalaji
Copy link
Contributor

pavanbalaji commented Apr 28, 2021

@minsii The DMA access latencies for most GPUs are in microseconds. In comparison, a function pointer dereference is ~25 cycles. So perhaps an expected gain comparison is useful before doing this?

@minsii minsii self-assigned this Apr 28, 2021
@minsii
Copy link
Collaborator Author

minsii commented Apr 28, 2021

Thanks for suggestion @pavanbalaji . I will study more about the expected gain before changing the code.

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