Remove special handling for dialect in Thrust's build system.#6722
Remove special handling for dialect in Thrust's build system.#6722alliepiper merged 7 commits intoNVIDIA:mainfrom
Conversation
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
|
/ok to test |
| # detect that the following instructions are unreachable. This is intentional | ||
| # and unavoidable in these cases. This target can be used to silence | ||
| # unreachable code warnings. | ||
| add_library(cccl.silence_unreachable_code_warnings INTERFACE) |
There was a problem hiding this comment.
This is no longer used, drive-by cleanup.
| enable_language(CXX) | ||
|
|
||
| # Support adding CUB to a parent project via add_subdirectory. | ||
| # See examples/cmake/add_subdir/CMakeLists.txt for details. |
There was a problem hiding this comment.
Made this cleanup across several projects -- these comments refer to hacks we no longer rely on, and the overall pattern can be cleaned up significantly as shown.
| if (CUB_ENABLE_TESTING OR CUB_ENABLE_EXAMPLES) | ||
| include(CTest) | ||
| enable_testing() | ||
| endif() |
There was a problem hiding this comment.
Made this refactoring across several projects. We always enable this in the CCCL root, so these have no effect.
|
|
||
| function(libcudacxx_create_internal_header_test header_name headertest_src) | ||
| # Create the default target for that file | ||
| set(internal_headertest_${header_name} verify_${header_name}) |
There was a problem hiding this comment.
Drive-by clean-up -- this has no effect, the created variable is never used. Same for the other libcu++ header test files.
a199c69 to
0fcc37a
Compare
|
/ok to test |
| ) | ||
| list(REMOVE_ITEM headers ${headers_exclude_details}) | ||
|
|
||
| # List of headers that aren't implemented for all backends, but are implemented for CUDA. |
There was a problem hiding this comment.
This block is a leftover from thrust::async:: test special handling. No longer needed.
0fcc37a to
8444963
Compare
|
/ok to test |
This comment has been minimized.
This comment has been minimized.
8444963 to
64ae6e6
Compare
|
/ok to test |
This comment has been minimized.
This comment has been minimized.
This enables python to build the c libraries it depends on.
The old implementation reinvented the wheel and depended on variables that can't be relied upon.
|
/ok to test |
| **Required.** The Python version to use for building the wheel, expressed | ||
| as `<major>.<minor>` (e.g. `3.11`). | ||
|
|
||
| .PARAMETER UseNinja |
There was a problem hiding this comment.
Removed the ability to use anything but ninja here. The default VS generator doesn't add all of the flags we need, and ninja is always available in our devcontainers.
This was a knock-on effect of the wheel packaging refactor that was necessary to fix how python installs CCCL headers.
| cuda_version=$(nvcc --version | grep -oP 'release \K[0-9]+\.[0-9]+' | cut -d. -f1) | ||
| echo "Detected CUDA version: ${cuda_version}" | ||
|
|
||
| # Configure compilers: |
There was a problem hiding this comment.
Required now that python is properly installing our headers without relying on CMake variables that aren't reliable.
| "Building for CUDA ${CUDA_VERSION_MAJOR}, output directory: ${CUDA_VERSION_DIR}" | ||
| ) | ||
|
|
||
| # Build cccl.c.parallel and add CCCL's install rules |
There was a problem hiding this comment.
Refactored to reuse CCCL's existing install rules, and avoid using <subproject>_SOURCE_DIR vars, which are not provided by find_package and only happened to be defined here randomly. These variables are no longer available here after other refactorings in this PR, so fixing this now make sense.
|
/ok to test |
| #pragma once | ||
|
|
||
| #include <cub/detail/ptx-json/object.h> | ||
| #include <cub/detail/ptx-json/object.cuh> |
There was a problem hiding this comment.
Another knock-on effect of fixing python's CCCL install, it exposed that our installs were missing some CUB headers due to some headers not following conventions. CUB's headers end in .cuh, not .h
We use .cuh, not .h in CUB. This broke our install rules.
bc9a654 to
1237e47
Compare
|
/ok to test |
This may actually be on purpose. I think I saw that the extension of some JSON headers were changed. Those are only needed when CUB is compiled from CCCL.C, and will hopefully go away over time when we roll out the new tuning API design. I think those headers are not meant to be installed or packaged with the CTK. @wmaxey and @griwes may know more here. |
bernhardmgruber
left a comment
There was a problem hiding this comment.
Except for the change of file extensions, which I am unsure about, LGTM! It's great to see we could remove so much logic! Thx a lot!
|
Gotcha. If that's the case we should exclude them from the install, but keep the header conventions. I checked and they aren't included anywhere other than the c libraries and cub, and the cub usages are gated behind a macro, so installing them shouldn't hurt anything. Fixing the extensions did break the header tests since they're being picked up for that now, but I'm fixing that now, commit incoming! |
|
/ok to test |
This comment has been minimized.
This comment has been minimized.
🥳 CI Workflow Results🟩 Finished in 2h 10m: Pass: 100%/267 | Total: 2d 00h | Max: 51m 34s | Hits: 99%/377961See results here. |
shwina
left a comment
There was a problem hiding this comment.
Python CMakeLists.txt changes and build script changes look good.
…#6722) * Remove special handling for dialect in Thrust's build system. * Allow consumers to set CCCL_TOP_LEVEL_PROJECT. This enables python to build the c libraries it depends on. * Force windows python builds to use ninja. * Exclude python build artifacts from git. * Fix python build to reuse CCCL's existing install rules. The old implementation reinvented the wheel and depended on variables that can't be relied upon. * Fix CUB header extensions. We use .cuh, not .h in CUB. This broke our install rules. * Fixup ptx_json header testing.
* Improvements to inspect_changes CI functionality. (#6535) 1. Rewrote `inspect_changes.sh` to python. 2. Split out project name, path, dependency information into new yaml file. 3. Simplified dependency specification (only direct dependencies are needed). 4. Split dependency specification into two types: full (use the pull_request matrix) and lite (use the pull_request_lite matrix). 5. Use new features to split some projects with expensive dependency chains into 'public' (public headers, etc) and `internal` (tests/examples/infra, etc). Dependencies are only added when the public API files change. 6. Update the ignored paths to include newer additions. 7. Add tests for inspect_changes to make it easier to test and validate modifications. * Add deps on thrust/cub to libcudacxx. (#6694) Complete the circle. * Fix oversubscription issue with lit precompile, label hack (#6554) * Remove MSVC hint that is applied globally in CCCL. * Fix oversubscription issue with lit precompile, label hack. Moves the C2H tests earlier in the config so we can add the fake dependency to lit. Explains and labels the hack we're using to avoid oversubscription. * Make missing sccache nonfatal. (#6582) * Add nvbench_helper tests to CI. (#6679) * Drive-by fix to packaging test script. Building isn't needed at the moment, but this will save some headaches if we add any executables that need to be built to this preset. * Fix warnings in nvbench_helper tests. * Skip test sizes that OOM CI runners. * Update boost dep to work with CMake 4+ * Enable CI coverage for nvbench_helper tests. * Update inspect_changes smoke tests. * Update libcudacxx C++ dialect handling. (#6693) * Switch preprocessor cache to S3. (#6561) This is more robust than the github cache approach, which evicts caches regularly due to a 10GB repo limit. The S3 cache will be more reliable and persistent. This also allows preprocessor caching in our linux devcontainers, improving developer experience with faster build times. * Restore libcudacxx dialect presets. (#6705) These were removed in #6693. * Remove special dialect handling from cudax build system. (#6702) * Remove special handling of C++ dialect in CUB's build system. (#6713) * Remove special handling for dialect in Thrust's build system. (#6722) * Remove special handling for dialect in Thrust's build system. * Allow consumers to set CCCL_TOP_LEVEL_PROJECT. This enables python to build the c libraries it depends on. * Force windows python builds to use ninja. * Exclude python build artifacts from git. * Fix python build to reuse CCCL's existing install rules. The old implementation reinvented the wheel and depended on variables that can't be relied upon. * Fix CUB header extensions. We use .cuh, not .h in CUB. This broke our install rules. * Fixup ptx_json header testing. * Fix issue with libcudacxx header tests. (#6785) Did some drive-by cleanups/standardizing of how our internal libraries link together. * Improve CMake package handling, add MSVC compat flags to libcudacxx's public interface. (#6791) * Change the MSVC preprocessor check to an error. When `/Zc:preprocessor` is not set, the build will error out before `#pragma message` directives are handled. Changing to an error ensures that this will be caught. * Add /Zc:preprocessor and /Zc:__cplusplus to public libcudacxx::libcudacxx target. * Remove dev build defs for /Zc:preprocessor and /Zc:__cplusplus. * Recheck languages on successive `find_package(libcudacxx)` calls. * Clean up dependency handling between projects. * Set <project>_DIR when locating packages with our add_subdir helper. This ensures that it behaves the same as find_package, and that later calls to find_package will locate the same configs. * Update test_packaging.sh to use the local repo for CPM. * Enable CUDA language and verbose logging for CMake example configs. * Reduce verbosity of libcudacxx package. * Fix early return checks. * Improve some option names / diagnostics. * Remove check for unsupported CTK versions.
Closes #6573
This ended up including several rabbit holes from knock-on effects:
find_package, and just happened to be available for reasons. The refactorings in this PR removed those variables and broke the install..gitignorefiles discovered after testing the python wheel build changes.