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

Cuda UniqueToken interface not consistent with other backends #1505

Closed
ibaned opened this issue Mar 29, 2018 · 5 comments
Closed

Cuda UniqueToken interface not consistent with other backends #1505

ibaned opened this issue Mar 29, 2018 · 5 comments
Assignees
Labels
Enhancement Improve existing capability; will potentially require voting
Milestone

Comments

@ibaned
Copy link
Contributor

ibaned commented Mar 29, 2018

@etphipp wrote:

All of the other implementations of UniqueToken<> have a default constructor of the form

UniqueToken( execution_space const& = execution_space() )

except the Cuda one. Is there a reason the Cuda one has a separate default constructor without an execution space argument (resulting in a UniqueToken that is basically useless)?

Btw, the Cuda specialization is missing the definition of size_type to be consistent with all of the others, e.g.,

using size_type       = int32_t;
@ibaned ibaned added Enhancement Improve existing capability; will potentially require voting help wanted labels Mar 29, 2018
@ibaned ibaned added this to the 2018 April milestone Mar 29, 2018
@ibaned ibaned self-assigned this Mar 29, 2018
@mhoemmen
Copy link
Contributor

@tjfulle may be interested in this.

@ndellingwood
Copy link
Contributor

It looks like concurrency() is to be deprecated in favor of UniqueToken, consistent default constructors will help with consistency and avoiding if-guards based on enabled backends when replacing concurrency() within Kokkos (and other codes).

@ibaned
Copy link
Contributor Author

ibaned commented Mar 29, 2018

Actually, I just talked to @dsunder . concurrency should not have been deprecated, that was a mistake. I'm about to open a pull request that does the deprecation correctly for all common back-ends.

@william76
Copy link

william76 commented Sep 25, 2018

@ibaned
I'm trying to use UniqueToken on a PR in Kokkos-Kernels 299 but it's not working... I've looked at examples showing how UniqueToken needs to be called differently for CUDA than the others?

I've looked at #1499 (comment) but I've tried using a c'tor with my execution space as the parameter and fails to compile on Cuda.

@william76
Copy link

Ahhh, I got it working. Using unique_token_t( ExecutionSpace() )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Improve existing capability; will potentially require voting
Projects
None yet
Development

No branches or pull requests

4 participants