commit4b309e6ad8Author: Allison Piper <alliepiper16@gmail.com> Date: Sat Apr 6 13:19:14 2024 +0000 Minor cleanups commit476ed2ceaeAuthor: Allison Piper <alliepiper16@gmail.com> Date: Sat Apr 6 12:53:37 2024 +0000 WAR compiler ice in nlohmann json. Only seeing this on GCC 9 + CTK 11.1. Seems to be having trouble with the `[[no_unique_address]]` optimization. commita9bf1d3e42Author: Allison Piper <alliepiper16@gmail.com> Date: Sat Apr 6 00:24:47 2024 +0000 Bump nlohmann json. commit80980fe373Author: Allison Piper <alliepiper16@gmail.com> Date: Sat Apr 6 00:22:07 2024 +0000 Fix llvm filesystem support commitf6099e6311Author: Allison Piper <alliepiper16@gmail.com> Date: Fri Apr 5 23:18:44 2024 +0000 Drop MSVC 2017 testing. commit5ae50a8ef5Author: Allison Piper <alliepiper16@gmail.com> Date: Fri Apr 5 23:02:32 2024 +0000 Add mroe missing headers. commitb2a9ae04d9Author: Allison Piper <alliepiper16@gmail.com> Date: Fri Apr 5 22:37:56 2024 +0000 Remove old CUDA+MSVC builds and make windows build-only. commit5b18c26a28Author: Allison Piper <alliepiper16@gmail.com> Date: Fri Apr 5 22:37:07 2024 +0000 Fix header for std::min/max. Why do I always think it's utility instead of algorithm.... commit6a409efa2dAuthor: Allison Piper <alliepiper16@gmail.com> Date: Fri Apr 5 22:18:18 2024 +0000 Temporarily disable CUPTI on all windows builds. commitf432f88866Author: Allison Piper <alliepiper16@gmail.com> Date: Fri Apr 5 21:42:52 2024 +0000 Fix warnings on MSVC. commit829787649bAuthor: Allison Piper <alliepiper16@gmail.com> Date: Fri Apr 5 21:03:16 2024 +0000 More flailing about in powershell. commit21742e6beaAuthor: Allison Piper <alliepiper16@gmail.com> Date: Fri Apr 5 20:36:08 2024 +0000 Cleanup filesystem header handling. commitde3d202635Author: Allison Piper <alliepiper16@gmail.com> Date: Fri Apr 5 20:09:00 2024 +0000 Windows CI debugging. commita4151667ffAuthor: Allison Piper <alliepiper16@gmail.com> Date: Fri Apr 5 19:45:40 2024 +0000 Quotation mark madness commitdd04f3befeAuthor: Allison Piper <alliepiper16@gmail.com> Date: Fri Apr 5 19:27:27 2024 +0000 Temporarily disable NVML on windows CI until new containers are ready. commitf3952848c4Author: Allison Piper <alliepiper16@gmail.com> Date: Fri Apr 5 19:25:22 2024 +0000 WAR issues on gcc-7. commit198986875eAuthor: Allison Piper <alliepiper16@gmail.com> Date: Fri Apr 5 19:25:04 2024 +0000 More matrix/devcontainer updates. commitb9712f8696Author: Allison Piper <alliepiper16@gmail.com> Date: Fri Apr 5 18:30:35 2024 +0000 Fix windows build scripts. commit943f268280Author: Allison Piper <alliepiper16@gmail.com> Date: Fri Apr 5 18:18:33 2024 +0000 Fix warnings with clang host compiler. commit7063e1d60aAuthor: Allison Piper <alliepiper16@gmail.com> Date: Fri Apr 5 18:14:28 2024 +0000 More devcontainer hijinks. commit06532fde81Author: Allison Piper <alliepiper16@gmail.com> Date: Fri Apr 5 17:51:25 2024 +0000 More matrix updates. commit78a265ea55Author: Allison Piper <alliepiper16@gmail.com> Date: Fri Apr 5 17:34:00 2024 +0000 Support CLI CMake options for windows ci scripts. commit670895c867Author: Allison Piper <alliepiper16@gmail.com> Date: Fri Apr 5 17:31:59 2024 +0000 Add missing devcontainers. commitb121823e74Author: Allison Piper <alliepiper16@gmail.com> Date: Fri Apr 5 17:22:54 2024 +0000 Build for `all-major` architectures in presets. We can get away with this because we require CMake 3.23.1. This was added in 3.23. commitfccfd44685Author: Allison Piper <alliepiper16@gmail.com> Date: Fri Apr 5 17:22:08 2024 +0000 Update matrix file. commite7d43ba90eAuthor: Allison Piper <alliepiper16@gmail.com> Date: Fri Apr 5 16:23:48 2024 +0000 Consolidate build/test jobs. commitc4044056ecAuthor: Allison Piper <alliepiper16@gmail.com> Date: Fri Apr 5 16:04:11 2024 +0000 Add missing build script.
Note
The instructions in this README are specific to Linux development environments. Instructions for Windows are coming soon!
CCCL Dev Containers
CCCL uses Development Containers to provide consistent and convenient development environments for both local development and for CI. This guide covers setup in Visual Studio Code and Docker. The guide also provides additional instructions in case you want use WSL.
Table of Contents
Quickstart: VSCode (Recommended)
Prerequisites
- Visual Studio Code
- Remote - Containers extension
- NVIDIA Container Toolkit
- Docker - This is only for completeness because it should already be implicitly installed by the Dev Containers extension
Steps
-
Clone the Repository
git clone https://github.com/nvidia/cccl.git -
Open the cloned directory in VSCode
-
Launch a Dev Container by clicking the prompt suggesting to "Reopen in Container"
-
Select an environment with the desired CTK and host compiler from the list:
-
VSCode will initialize the selected Dev Container. This can take a few minutes the first time.
-
Once initialized, the local
cccl/directory is mirrored into the container to ensure any changes are persistent. -
Done! See the contributing guide for instructions on how to build and run tests.
(Optional) Authenticate with GitHub for sccache
After starting the container, there will be a prompt to authenticate with GitHub. This grants access to a sccache server shared with CI and greatly accelerates local build times. This is currently limited to NVIDIA employees belonging to the NVIDIA or rapidsai GitHub organizations.
Without authentication to the remote server, sccache will still accelerate local builds by using a filesystem cache.
Follow the instructions in the prompt as below and enter the one-time code at https://github.com/login/device
To manually trigger this authentication, execute the devcontainer-utils-vault-s3-init script within the container.
For more information about the sccache configuration and authentication, see the documentation at rapidsai/devcontainers.
Quickstart: Docker (Manual Approach)
Prerequisites
Steps
-
Clone the repository and use the
launch.shscript to launch the default container environmentgit clone https://github.com/nvidia/cccl.git cd cccl ./.devcontainer/launch.sh --dockerThis script starts an interactive shell as the
coderuser inside the container with the localcccl/directory mirrored into/home/coder/cccl.For specific environments, use the
--cudaand--hostoptions:./.devcontainer/launch.sh --docker --cuda 12.2 --host gcc10See
./.devcontainer/launch.sh --helpfor more information. -
Done. See the contributing guide for instructions on how to build and run tests.
Available Environments
CCCL provides environments for both the oldest and newest supported CUDA versions with all compatible host compilers.
Look in the .devcontainer/ directory to see the available configurations. The top-level devcontainer.json serves as the default environment. All devcontainer.json files in the cuda<CTK_VERSION>-<HOST-COMPILER> sub-directories are variations on this top-level file, with different base images for the different CUDA and host compiler versions.
VSCode Customization
By default, CCCL's Dev Containers come with certain VSCode settings and extensions configured by default, as can be seen in the devcontainer.json file. This can be further customized by users without needing to modify the devcontainer.json file directly.
For extensions, the dev.containers.defaultExtensions setting allows listing extensions that will always be installed.
For more general customizations, VSCode allows using a dotfile repository. See the VSCode documentation for more information.
GitHub Codespaces
One of the benefits of Dev Containers is that they integrate natively with GitHub Codespaces. Codespaces provide a VSCode development environment right in your browser running on a machine in the cloud. This provides a truly one-click, turnkey development environment where you can develop, build, and test with no other setup required.
Click the badge above or click here to get started with CCCL's Dev Containers on Codespaces. This will start the default Dev Container environment. Click here to start a Codespace with a particular environment and hardware configuration as shown:
For Maintainers: The make_devcontainers.sh Script
Overview
make_devcontainers.sh generates devcontainer configurations for the unique combinations of CUDA Toolkit (CTK) versions and host compilers in ci/matrix.yaml.
How It Works:
- Parses the matrix from
ci/matrix.yaml. - Use the top-level
.devcontainer/devcontainer.jsonas a template. For each unique combination of CTK version and host compiler, generate a correspondingdevcontainer.jsonconfiguration, adjusting only the base Docker image to match the desired environment. - Place the generated configurations in the
.devcontainerdirectory, organizing them into subdirectories following the naming conventioncuda<CTK_VERSION>-<COMPILER_VERSION>.
For more information, see the .devcontainer/make_devcontainers.sh --help message.
Note: When adding or updating supported environments, modify matrix.yaml and then rerun this script to synchronize the devcontainer configurations.
Quickstart: Using WSL
Note
Make sure you have the Nvidia driver installed on your Windows host before moving further. Type in
nvidia-smifor verification.
Install WSL on your Windows host
Warning
Disclaimer: This guide was developed for WSL 2 on Windows 11.
-
Launch a Windows terminal (e.g. Powershell) as an administrator.
-
Install WSL 2 by running:
wsl --install
This should probably install Ubuntu distro as a default.
- Restart your computer and run
wsl -l -von a Windows terminal to verify installation.
Install prerequisites and VS Code extensions
-
Launch your WSL/Ubuntu terminal by running
wslin Powershell. -
Install the WSL extension on VS Code.
-
Ctrl + Shift + Pand selectWSL: Connect to WSL(it will prompt you to install the WSL extension). -
Make sure you are connected to WSL with VS Code by checking the bottom left corner of the VS Code window (should indicate "WSL: Ubuntu" in our case).
-
-
Install the Dev Containers extension on VS Code.
- In a vanilla system you should be prompted to install
Dockerat this point, accept it. If it hangs you might have to restart VS Code after that.
- In a vanilla system you should be prompted to install
-
Install the NVIDIA Container Toolkit. Make sure you install the WSL 2 version and not the native Linux one. This builds on top of Docker so make sure you have Docker properly installed (run
docker --version). -
Open
/etc/docker/daemon.jsonfrom within your WSL system (if the file does not exist, create it) and add the following:
{
"runtimes": {
"nvidia": {
"path": "nvidia-container-runtime",
"runtimeArgs": []
}
}
}
then run sudo systemctl restart docker.service.
Build CCCL in WSL using Dev Containers
-
Still on your WSL terminal run
git clone https://github.com/NVIDIA/cccl.git -
Open the CCCL cloned repo in VS Code (
Ctrl + Shift + P, selectFile: Open Folder...and select the path where your CCCL clone is located). -
If prompted, choose
Reopen in Container.- If you are not prompted just type
Ctrl + Shift + PandDev Containers: Open Folder in Container ....
- If you are not prompted just type
-
Verify that Dev Container was configured properly by running
nvidia-smiin your Dev Container terminal. For a proper configuration it is important for the steps in Install prerequisites and VS Code extensions to be followed in a precise order.
From that point on, the guide aligns with our existing Dev Containers native Linux guide with just one minor potential alteration:
- If WSL was launched without the X-server enabled, when asked to "authenticate Git with your Github credentials", if you answer Yes, the browser might not open automatically, with the following error message.
Failed opening a web browser at https://github.com/login/device exec: "xdg-open,x-www-browser,www-browser,wslview": executable file not found in $PATH Please try entering the URL in your browser manually
In that case type in the address manually in your web browser https://github.com/login/device and fill in the one-time code.




