[CCCL] Add missing CCCL components: c2h, nvbench_helper, cmake, cudax, AGENTS.md
Added 863 files from NVIDIA/cccl sparse checkout: - c2h/ (27 files): Catch2 test helpers — generators, validators, runner - nvbench_helper/ (10 files): Benchmark harness utilities - cmake/ (29 files): CMake presets and build helpers - cudax/ (794 files): Experimental CUDA extensions - AGENTS.md: NVIDIA's official AI agent instructions for CCCL - CMakePresets.json: Standardized build configurations - cccl-version.json: Version tracking Also added CCCL_ASSET_MAP.md mapping all 4295 CCCL files to competition value and PRD items. cccl_upstream now covers 100% of competition-critical assets: - 27 tuning headers (SM80/90/100 benchmark data) - 32 dispatch headers (algorithm implementations) - 60 Thrust examples (correctness verification) - 217 CUB Catch2 tests (regression matrix) - 153 CUB benchmarks (parameter space search) - 18 CUB examples (API verification) - 27 test helpers + benchmark harness - 794 cudax experimental extensions
This commit is contained in:
120
cccl_upstream/cmake/find_modules/FindNCCL.cmake
Normal file
120
cccl_upstream/cmake/find_modules/FindNCCL.cmake
Normal file
@@ -0,0 +1,120 @@
|
||||
#===----------------------------------------------------------------------===##
|
||||
#
|
||||
# Part of CUDA Experimental in CUDA C++ Core Libraries,
|
||||
# under the Apache License v2.0 with LLVM Exceptions.
|
||||
# See https://llvm.org/LICENSE.txt for license information.
|
||||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES.
|
||||
#
|
||||
#===----------------------------------------------------------------------===##
|
||||
|
||||
#[=======================================================================[.rst:
|
||||
FindNCCL
|
||||
--------
|
||||
|
||||
Find NCCL
|
||||
|
||||
Imported targets
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
This module defines the following :prop_tgt:`IMPORTED` target(s):
|
||||
|
||||
``NCCL::nccl``
|
||||
The NCCL library, if found.
|
||||
|
||||
Result variables
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
This module will set the following variables in your project:
|
||||
|
||||
``NCCL_FOUND``
|
||||
True if NCCL is found.
|
||||
``NCCL_INCLUDE_DIRS``
|
||||
The include directories needed to use NCCL.
|
||||
``NCCL_LIBRARIES``
|
||||
The libraries needed to useNCCL.
|
||||
``NCCL_VERSION_STRING``
|
||||
The version of the NCCL library found. [OPTIONAL]
|
||||
|
||||
#]=======================================================================]
|
||||
|
||||
# Prefer using a Config module if it exists for this project
|
||||
|
||||
include(${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake)
|
||||
|
||||
# Also search CUDA paths for good measure
|
||||
if (CUDAToolkit_ROOT)
|
||||
list(APPEND CMAKE_PREFIX_PATH ${CUDAToolkit_ROOT})
|
||||
endif()
|
||||
|
||||
find_package(NCCL CONFIG QUIET)
|
||||
if (NCCL_FOUND)
|
||||
find_package_handle_standard_args(NCCL DEFAULT_MSG NCCL_CONFIG)
|
||||
return()
|
||||
endif()
|
||||
|
||||
find_path(NCCL_INCLUDE_DIR NAMES nccl.h)
|
||||
|
||||
if (NOT NCCL_LIBRARY)
|
||||
find_library(NCCL_LIBRARY_RELEASE NAMES nccl)
|
||||
find_library(NCCL_LIBRARY_DEBUG NAMES nccld)
|
||||
|
||||
include(${CMAKE_ROOT}/Modules/SelectLibraryConfigurations.cmake)
|
||||
select_library_configurations(NCCL)
|
||||
unset(NCCL_FOUND) # incorrectly set by select_library_configurations
|
||||
endif()
|
||||
|
||||
find_package_handle_standard_args(
|
||||
NCCL
|
||||
FOUND_VAR NCCL_FOUND
|
||||
REQUIRED_VARS NCCL_LIBRARY NCCL_INCLUDE_DIR
|
||||
VERSION_VAR NCCL_VERSION
|
||||
)
|
||||
|
||||
if (NCCL_FOUND)
|
||||
set(NCCL_INCLUDE_DIRS ${NCCL_INCLUDE_DIR})
|
||||
|
||||
if (NOT NCCL_LIBRARIES)
|
||||
set(NCCL_LIBRARIES ${NCCL_LIBRARY})
|
||||
endif()
|
||||
|
||||
if (NOT TARGET NCCL::nccl)
|
||||
add_library(NCCL::nccl UNKNOWN IMPORTED GLOBAL)
|
||||
set_target_properties(
|
||||
NCCL::nccl
|
||||
PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${NCCL_INCLUDE_DIRS}"
|
||||
)
|
||||
|
||||
if (NCCL_LIBRARY_RELEASE)
|
||||
set_property(
|
||||
TARGET NCCL::nccl
|
||||
APPEND
|
||||
PROPERTY IMPORTED_CONFIGURATIONS RELEASE
|
||||
)
|
||||
set_target_properties(
|
||||
NCCL::nccl
|
||||
PROPERTIES IMPORTED_LOCATION_RELEASE "${NCCL_LIBRARY_RELEASE}"
|
||||
)
|
||||
endif()
|
||||
|
||||
if (NCCL_LIBRARY_DEBUG)
|
||||
set_property(
|
||||
TARGET NCCL::nccl
|
||||
APPEND
|
||||
PROPERTY IMPORTED_CONFIGURATIONS DEBUG
|
||||
)
|
||||
set_target_properties(
|
||||
NCCL::nccl
|
||||
PROPERTIES IMPORTED_LOCATION_DEBUG "${NCCL_LIBRARY_DEBUG}"
|
||||
)
|
||||
endif()
|
||||
|
||||
if (NOT NCCL_LIBRARY_RELEASE AND NOT NCCL_LIBRARY_DEBUG)
|
||||
set_property(
|
||||
TARGET NCCL::nccl
|
||||
APPEND
|
||||
PROPERTY IMPORTED_LOCATION "${NCCL_LIBRARY}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
Reference in New Issue
Block a user