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

[DOC]: Does libcu++ support non-CUDA compilers? #1968

Closed
1 task done
bernhardmgruber opened this issue Jul 10, 2024 · 3 comments · Fixed by #1969
Closed
1 task done

[DOC]: Does libcu++ support non-CUDA compilers? #1968

bernhardmgruber opened this issue Jul 10, 2024 · 3 comments · Fixed by #1969
Labels
doc Documentation-related items.

Comments

@bernhardmgruber
Copy link
Contributor

Is this a duplicate?

Is this for new documentation, or an update to existing docs?

New

Describe the incorrect/future/missing documentation

The documentation of libcu++ specifies the following:

  • std:: / <*>: This is your host compiler's Standard Library that works in __host__ code only, although you
    can use the --expt-relaxed-constexpr flag to use any constexpr functions in __device__ code.
    libcu++ does not replace or interfere with host compiler's Standard Library.
  • cuda::std:: / <cuda/std/*>: Conforming implementations of facilities from the Standard Library that work in
    __host__ __device__ code.
  • cuda:: / <cuda/*>: Conforming extensions to the Standard Library that work in __host__ __device__ code.
  • cuda::device / <cuda/device/*>: Conforming extensions to the Standard Library that work only in
    __device__ code.
  • cuda::ptx: C++ convenience wrappers for inline PTX (only usable in __device__ code).

However, it does not specify whether "works in __host__ code" implies that it can be compiled by a non-CUDA compiler like g++. This is highly desirable though and appears to be existing practice. Thrust's TBB and OMP backends for example can be compiled by several non-CUDA compilers (e.g. g++, clang, icpc, msvc, nvc++, etc.) and Thrust uses libcu++ in a lot of places already.

I would like the documentation of libcu++ to explicitly point out support for non-CUDA compilers for every feature supported in __host__ code.

If this is a correction, please provide a link to the incorrect documentation. If this is a new documentation request, please link to where you have looked.

No response

@bernhardmgruber
Copy link
Contributor Author

I just discussed this with @wmaxey and he confirmed that __host__ code should also work when being compiled with a non-CUDA compiler like g++.

bernhardmgruber added a commit to bernhardmgruber/cccl that referenced this issue Jul 10, 2024
@cccl-authenticator-app cccl-authenticator-app bot moved this from Todo to In Progress in CCCL Jul 10, 2024
@cccl-authenticator-app cccl-authenticator-app bot moved this from In Progress to In Review in CCCL Jul 10, 2024
@jrhemstad
Copy link
Collaborator

I think this may be redundant with #1374

@bernhardmgruber
Copy link
Contributor Author

I think this may be redundant with #1374

It is.

@github-project-automation github-project-automation bot moved this from In Review to Done in CCCL Jul 11, 2024
@bernhardmgruber bernhardmgruber closed this as not planned Won't fix, can't repro, duplicate, stale Jul 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Documentation-related items.
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants