Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

Redistributable #214

Closed
seanbaxter opened this issue Oct 21, 2021 · 8 comments
Closed

Redistributable #214

seanbaxter opened this issue Oct 21, 2021 · 8 comments

Comments

@seanbaxter
Copy link

I'm interested in supporting this library on my own compiler. Do you provide a binary redistributable that covers the non-header portions of the library? Would that be hiding in the hpc toolkit somewhere? Basically I'm looking for guidance on deployment.

@brycelelbach
Copy link
Collaborator

It's header only - there's no binary component.

@wmaxey
Copy link
Member

wmaxey commented Oct 21, 2021

Bryce beat me to the punch.

Our CMake configuration is there to make lit happy enough to chew through our tests. It does not currently install or build anything and is better off ignored for most end user things.

We don't really have any platform specific configuration we do at CMake configure time, most of our checks are in the __config headers. If Circle emits the right macros things maybe should work fine? I'd be happy to triage any issues if you encounter them.

@seanbaxter
Copy link
Author

How is it header only? I'm looking at dozens of .cpp files full of definitions that have to be compiled.

Here's the declaration for cout:
https://github.com/NVIDIA/libcudacxx/blob/main/include/cuda/std/detail/libcxx/include/iostream#L53

Here's its definition, in a cpp file:
https://github.com/NVIDIA/libcudacxx/blob/main/libcxx/src/iostream.cpp#L38

Here's the decaration for operator new:
https://github.com/NVIDIA/libcudacxx/blob/main/include/cuda/std/detail/libcxx/include/new#L188

Here's it's definition, in a cpp file:
https://github.com/NVIDIA/libcudacxx/blob/main/libcxx/src/new.cpp#L62

@griwes
Copy link
Collaborator

griwes commented Oct 21, 2021

As you may have noticed, the headers you linked are deep within a "detail" directory. Only headers that are directly in include/cuda and include/cuda/std are supported at this time.

@wmaxey
Copy link
Member

wmaxey commented Oct 21, 2021

You are correct, those are functional underpinnings of our library. However, we do not expose those to users.

The only front-end that should be available to users are the files located in include/cuda/std anything below that directory is outside of the scope of what libcudacxx supports.

Yes, someone could forcefully include include/cuda/std/detail/libcxx/include/iostream, but that would quickly fail for a variety of reasons. (e.g. https://stackoverflow.com/questions/68075342/how-do-i-properly-include-files-from-the-nvidia-c-standard-library)

Libcudacxx is an extremely slim implementation of some memory model fundamentals, synchronization, and a growing subset of utilities. Things like memory allocation and iostream are on the roadmap, but will require more design and time. :(

@seanbaxter
Copy link
Author

seanbaxter commented Oct 21, 2021

I'm not expecting to use any of that stuff on the device. My understanding is that this is a fork of libc++ with some special sauce for GPU, but that it provides a standard lib for the whole system. How do I use iostreams, etc, on the host? I wouldn't be simultaneously including both libcudacxx and libstdc++, rigth?

@wmaxey
Copy link
Member

wmaxey commented Oct 21, 2021

We should be non-interfering with host standard libraries! To the best of my knowledge that hasn't been broken yet except for some weird ADL stuff going on in GCC-9.

@griwes
Copy link
Collaborator

griwes commented Oct 21, 2021

Your understanding is incorrect. At this time, libcu++ does not implement namespace std, but implements versions of a partial subset of it as cuda::std, and extentions to some of these (plus some additional APIs) in namespace cuda.

Please refer to the documentation to see what is supported at this time.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants