-
Notifications
You must be signed in to change notification settings - Fork 5
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
Remove dependency on cub #449
Remove dependency on cub #449
Conversation
looks ok but includes explicitly #447. Any suggestion? |
Do you mean the it appears in the diff ? |
Nope. |
According to a discussion on GitHub forums it's not a bug, it's a feature:
This matches what I see locally: normal git diff with two dots ..
git diff with three dots ...
So, it looks like the only options for cleaning up the diff are to
The rebase cannot be done automatically, so I would not suggest doing it. The squash is as simple as
(if anybody knows a simpler way, I'll be happy to hear it) However, in out case this affects only the diff shown on GitHub: when we merge we squash all commits anyway, so the end results will be the same. |
Is it technically possible to run 'code format' directly on git? |
Not as far as I know. |
Looks good for merging, waiting just to give @makortel a chance to comment. |
@@ -331,8 +331,7 @@ namespace notcub { | |||
cudaError_t error = cudaSuccess; | |||
|
|||
if (device == INVALID_DEVICE_ORDINAL) { | |||
if (CubDebug(error = cudaGetDevice(&entrypoint_device))) | |||
return error; | |||
cudaCheck(error = cudaGetDevice(&entrypoint_device)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If all errors are handled with cudaCheck()
internally, I'd expect there is no need to return an "error code" anymore (that was already passed through cudaCheck()
in the calling code). Something to be cleaned up in a subsequent PR though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we don't expect errors, I would just cudaCheck
all function calls (except for retrying the out-of-memory case).
Can be followed up later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we don't expect errors, I would just
cudaCheck
all function calls (except for retrying the out-of-memory case).
Can be followed up later.
I agree.
} | ||
|
||
// Allocate the block if necessary | ||
if (!found) { | ||
// Attempt to allocate | ||
// TODO: eventually support allocation flags | ||
if (CubDebug(error = cudaHostAlloc(&search_key.d_ptr, search_key.bytes, cudaHostAllocDefault)) == | ||
if ((error = cudaHostAlloc(&search_key.d_ptr, search_key.bytes, cudaHostAllocDefault)) == |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a functional change, earlier it would print out the error code if CUB_STDERR
was defined (which IIRC we do define). Doesn't really matter to me though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The caching allocators would benefit from further cleanup (well, rewrite from scratch really...), but better to be done later.
@fwyzard Thanks for annotating all the changes, I think this PR is good to go now. |
Annotate all CMS-specific changes to CachingDeviceAllocator. Co-authored-by: Andrea Bocci <andrea.bocci@cern.ch>
Annotate all CMS-specific changes to CachingDeviceAllocator. Co-authored-by: Andrea Bocci <andrea.bocci@cern.ch>
Annotate all CMS-specific changes to CachingDeviceAllocator. Co-authored-by: Andrea Bocci <andrea.bocci@cern.ch>
Annotate all CMS-specific changes to CachingDeviceAllocator. Co-authored-by: Andrea Bocci <andrea.bocci@cern.ch>
Annotate all CMS-specific changes to CachingDeviceAllocator. Co-authored-by: Andrea Bocci <andrea.bocci@cern.ch>
Annotate all CMS-specific changes to CachingDeviceAllocator. Co-authored-by: Andrea Bocci <andrea.bocci@cern.ch>
Annotate all CMS-specific changes to CachingDeviceAllocator. Co-authored-by: Andrea Bocci <andrea.bocci@cern.ch>
Annotate all CMS-specific changes to CachingDeviceAllocator. Co-authored-by: Andrea Bocci <andrea.bocci@cern.ch>
Annotate all CMS-specific changes to CachingDeviceAllocator. Co-authored-by: Andrea Bocci <andrea.bocci@cern.ch>
Annotate all CMS-specific changes to CachingDeviceAllocator. Co-authored-by: Andrea Bocci <andrea.bocci@cern.ch>
Annotate all CMS-specific changes to CachingDeviceAllocator. Co-authored-by: Andrea Bocci <andrea.bocci@cern.ch>
This PR build on #447 and remove dependencies from cub in the allocator as well.
BuildFiles have been cleaned.
In principle cub can be removed as required external.
test passed