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

[FEA]: Replace thrust type traits with libcu++ #487

Open
1 task done
miscco opened this issue Sep 26, 2023 · 8 comments
Open
1 task done

[FEA]: Replace thrust type traits with libcu++ #487

miscco opened this issue Sep 26, 2023 · 8 comments
Assignees
Labels
feature request New feature or request. good first issue Good for newcomers. help wanted Request for input or help from the community thrust For all items related to Thrust.

Comments

@miscco
Copy link
Collaborator

miscco commented Sep 26, 2023

Is this a duplicate?

Area

Thrust

Is your feature request related to a problem? Please describe.

Thrust predates our investments into libcu++.

Consequently it has a lot of machinery implemented on its own. Mostly in https://github.com/NVIDIA/cccl/blob/main/thrust/thrust/detail/type_traits.h

We should remove all custom type traits in favor of cuda::std:: implementations

Describe the solution you'd like

We should simply include the cuda/std/type_traits header and use aliases whenever possible, e.g. this

template<typename T1, typename T2>
  struct is_same
    : public false_type
{
}; // end is_same

template<typename T>
  struct is_same<T,T>
    : public true_type
{
}; // end is_same

Would become:

template<typename T, typename U>
using is_same = ::cuda::std::is_same<T,U>:

Describe alternatives you've considered

No response

Additional context

No response

@miscco miscco added the feature request New feature or request. label Sep 26, 2023
@github-project-automation github-project-automation bot moved this to Todo in CCCL Sep 26, 2023
@miscco miscco added thrust For all items related to Thrust. good first issue Good for newcomers. help wanted Request for input or help from the community labels Sep 26, 2023
@leofang
Copy link
Member

leofang commented Sep 30, 2023

I'm all for this and would love to see it prioritized. This is a blocker for addressing #403. Based on my study (cupy/cupy#7869), Thrust is extremely NVRTC unfriendly because thrust/detail/type_traits.h directly/indirectly includes a ton of host code that just paralyzes NVRTC. Fixing at least this header moves us one step closer.

@ZelboK
Copy link
Contributor

ZelboK commented Oct 9, 2023

Hi, never contributed before, but this one looks like a good first issue. I will try to tackle this on my own time if that is ok :)

@miscco
Copy link
Collaborator Author

miscco commented Oct 9, 2023

Hi, never contributed before, but this one looks like a good first issue. I will try to tackle this on my own time if that is ok :)

Hi @ZelboK that is awesome! Please do not hesitate to ping us here if there are any questions arising.

We are painfully aware that our documentation currently is not up to date

@jrhemstad
Copy link
Collaborator

We are painfully aware that our documentation currently is not up to date

Hey, our contributor guide docs are up to date! @ZelboK you can check out how to get started here: https://github.com/NVIDIA/cccl/blob/main/CONTRIBUTING.md

To start, I'd suggest making sure you can set up the development containers and can successfully build the tests.

@ZelboK
Copy link
Contributor

ZelboK commented Oct 9, 2023

Thank you folks! Is there some slack channel or discord server that I can join, or is this the preferred discussion channel?

I currently use WSL2 and a 3080. Currently following the docs on building the tests. Hopefully I won't run into too many troubles with code generation on older architectures. I plan on doing this independently before I ask questions for the learning experience :)

@jrhemstad
Copy link
Collaborator

Is there some slack channel or discord server that I can join, or is this the preferred discussion channel?

Not yet, I'm working on getting us a dedicated channel on the NVIDIA Discord. I'll let you know when I've got that done :)

I currently use WSL2 and a 3080.

This should work as there are folks on our team who use WSL2 with the Dev Containers. It's on my TODO list to add a section for any WSL-specific instructions to the dev container README.

Let us know if you run into any problems!

@jrhemstad
Copy link
Collaborator

Hey @ZelboK, you can join the #cuda-cpp-core-libraries channel on the NVIDIA Discord here: https://discord.gg/nvXdfvRh

@ZelboK
Copy link
Contributor

ZelboK commented Oct 9, 2023

Joined! Thank you that was quick :) My discord IGN is Kashimo. I should probably stop using different names everywhere

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request. good first issue Good for newcomers. help wanted Request for input or help from the community thrust For all items related to Thrust.
Projects
Status: Todo
Development

No branches or pull requests

4 participants