-
Notifications
You must be signed in to change notification settings - Fork 143
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
[Bug] Alignment calculation in test code is inconsistent and one place incorrect #212
Comments
This change includes: Moving ROUND_UP() definition to common.hpp. Use ROUND_UP() to perform alignment adjustments. fixes NVIDIA#212
@pakmarkthub could you please have a look at Raj's PR #213 ? |
This change includes: Renaming ROUND_UP() to PAGE_ROUNJD_UP() Moving PAGE_ROUND_UP() definition to common.hpp. Use PAGE_ROUND_UP() to perform alignment adjustments. fixes NVIDIA#212
This change includes: Renaming ROUND_UP() to PAGE_ROUND_UP() Moving PAGE_ROUND_UP() definition to common.hpp. Use PAGE_ROUND_UP() to perform alignment adjustments. fixes NVIDIA#212
@pakmarkthub modified changes as per your request. Please have a look. |
copying previous conversations from this PR pakmarkthub commented on Oct 25, 2021, 8:11 AM GMT+5:30
raj111samant commented on Oct 25, 2021, 5:36 PM GMT+5:30
pakmarkthub commented on Oct 26, 2021, 7:21 AM GMT+5:30
|
I don't see your PR anymore. PR #213 has been closed without merge. It contains no commit. Can you fix it or create a new PR? |
Size and address needs to be aligned to GPU_PAGE_SIZE.
In test code, alignment is performed by direct mathematical operation rather than encapsulating it in ROUND_UP macro.
This has led to bug creep in common.cpp file
if (aligned_mapping) allocated_size = size + GPU_PAGE_SIZE - 1; else allocated_size = size;
Suggested fix:
Use ROUND_UP macro uniformly to adjust for alignment.
The text was updated successfully, but these errors were encountered: