Skip to content

Use host-pinned, mapped memory#8

Draft
gzagaris wants to merge 4 commits intomainfrom
feature/gzagaris/host-pinned-memory
Draft

Use host-pinned, mapped memory#8
gzagaris wants to merge 4 commits intomainfrom
feature/gzagaris/host-pinned-memory

Conversation

@gzagaris
Copy link
Copy Markdown
Collaborator

No description provided.

qnn=gpu::allocate_on_device<double>(sizeof(double)*(ncells+nhalo)*nfields);
res_d=gpu::allocate_on_device<double>(sizeof(double)*(ncells+nhalo)*nfields);
dq_d=gpu::allocate_on_device<double>(sizeof(double)*(ncells+nhalo)*nfields);
res_d=gpu::allocate_host_pinned<double>(sizeof(double)*(ncells+nhalo)*nfields);
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why allocate res_d and dq_d as host pinned ? I get that for the qbuf, but won't this be inefficient if we host pin the residual and dq, the main arrays that get filled in by GPU kernels ?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe I made this change b/c both res_d and dq_d are passed to the UpdateFringes. Yes, I agree this is definitely not ideal -- I am still fiddling with it.

@gzagaris gzagaris force-pushed the feature/gzagaris/host-pinned-memory branch from 43ef1cd to b6bba0e Compare September 27, 2021 13:02
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

Successfully merging this pull request may close these issues.

2 participants