Skip to content

Commit 365f8ea

Browse files
committed
Merge branch 'branch-24.10' into branch-25.02-merge-24.10
2 parents d39ba93 + a4b2ca1 commit 365f8ea

File tree

77 files changed

+5132
-1052
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+5132
-1052
lines changed

.devcontainer/conda/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515

16-
FROM rapidsai/devcontainers:23.04-cuda12.1-mambaforge-ubuntu22.04 AS base
16+
FROM rapidsai/devcontainers:24.12-cuda12.1-mambaforge-ubuntu22.04 AS base
1717

1818
ENV PATH="${PATH}:/workspaces/mrc/.devcontainer/bin"

.devcontainer/conda/devcontainer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"MRC_ROOT": "${containerWorkspaceFolder}",
3636
"DEFAULT_CONDA_ENV": "mrc",
3737
"MAMBA_NO_BANNER": "1",
38-
"VAULT_HOST": "https://vault.ops.k8s.rapids.ai"
38+
"AWS_ROLE_ARN": "arn:aws:iam::279114543810:role/nv-gha-token-sccache-devs"
3939
},
4040
"initializeCommand": [ "${localWorkspaceFolder}/.devcontainer/conda/initialize-command.sh" ],
4141
"remoteUser": "coder",

.devcontainer/opt/mrc/conda/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515

16-
FROM rapidsai/devcontainers:23.04-cuda12.1-mambaforge-ubuntu22.04 AS base
16+
FROM rapidsai/devcontainers:24.12-cuda12.1-mambaforge-ubuntu22.04 AS base
1717

1818
ENV PATH="${PATH}:/workspaces/mrc/.devcontainer/bin"

.devcontainer/opt/mrc/conda/devcontainer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"MRC_ROOT": "${containerWorkspaceFolder}",
3636
"DEFAULT_CONDA_ENV": "mrc",
3737
"MAMBA_NO_BANNER": "1",
38-
"VAULT_HOST": "https://vault.ops.k8s.rapids.ai"
38+
"AWS_ROLE_ARN": "arn:aws:iam::279114543810:role/nv-gha-token-sccache-devs"
3939
},
4040
"initializeCommand": [ "${localWorkspaceFolder}/.devcontainer/initialize-command.sh" ],
4141
"remoteUser": "coder",

.github/workflows/pr.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ jobs:
5858
steps:
5959
- name: Get PR Info
6060
id: get-pr-info
61-
uses: rapidsai/shared-action-workflows/get-pr-info@branch-23.08
61+
uses: nv-gha-runners/get-pr-info@main
6262
if: ${{ startsWith(github.ref_name, 'pull-request/') }}
6363
outputs:
6464
is_pr: ${{ startsWith(github.ref_name, 'pull-request/') }}

CMakeLists.txt

+41-2
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,6 @@ project(mrc
8585

8686
morpheus_utils_initialize_install_prefix(MRC_USE_CONDA)
8787

88-
rapids_cmake_write_version_file(${CMAKE_BINARY_DIR}/autogenerated/include/mrc/version.hpp)
89-
9088
# Delay enabling CUDA until after we have determined our CXX compiler
9189
if(NOT DEFINED CMAKE_CUDA_HOST_COMPILER)
9290
message(STATUS "Setting CUDA host compiler to match CXX compiler: ${CMAKE_CXX_COMPILER}")
@@ -180,6 +178,47 @@ if(MRC_BUILD_DOCS)
180178
add_subdirectory(docs)
181179
endif()
182180

181+
# ##################################################################################################
182+
# - install export ---------------------------------------------------------------------------------
183+
184+
set(doc_string
185+
[=[
186+
Provide targets for mrc.
187+
]=])
188+
189+
set(code_string "")
190+
191+
set(rapids_project_version_compat SameMinorVersion)
192+
193+
# Need to explicitly set VERSION ${PROJECT_VERSION} here since rapids_cmake gets
194+
# confused with the `RAPIDS_VERSION` variable we use
195+
rapids_export(INSTALL ${PROJECT_NAME}
196+
EXPORT_SET ${PROJECT_NAME}-exports
197+
GLOBAL_TARGETS libmrc pymrc
198+
COMPONENTS python
199+
COMPONENTS_EXPORT_SET ${PROJECT_NAME}-python-exports
200+
VERSION ${PROJECT_VERSION}
201+
NAMESPACE mrc::
202+
DOCUMENTATION doc_string
203+
FINAL_CODE_BLOCK code_string
204+
)
205+
206+
# ##################################################################################################
207+
# - build export -----------------------------------------------------------------------------------
208+
rapids_export(BUILD ${PROJECT_NAME}
209+
EXPORT_SET ${PROJECT_NAME}-exports
210+
GLOBAL_TARGETS libmrc pymrc
211+
COMPONENTS python
212+
COMPONENTS_EXPORT_SET ${PROJECT_NAME}-python-exports
213+
VERSION ${PROJECT_VERSION}
214+
LANGUAGES C CXX CUDA
215+
NAMESPACE mrc::
216+
DOCUMENTATION doc_string
217+
FINAL_CODE_BLOCK code_string
218+
)
219+
220+
# ##################################################################################################
221+
# - debug info -------------------------------------------------------------------------------------
183222
if (MRC_ENABLE_DEBUG_INFO)
184223
morpheus_utils_print_all_targets()
185224

ci/iwyu/mappings.imp

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## Include mappings
44

55
# stdlib
6+
{ "include": [ "<bits/chrono.h>", private, "<chrono>", "public" ] },
67
{ "include": [ "<bits/cxxabi_forced.h>", private, "<mutex>", "public" ] },
78
{ "include": [ "<bits/cxxabi_forced.h>", private, "<vector>", "public" ] },
89
{ "include": [ "<bits/this_thread_sleep.h>", private, "<thread>", "public" ] },

ci/scripts/cpp_checks.sh

+1-2
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,8 @@ if [[ -n "${MRC_MODIFIED_FILES}" ]]; then
8080

8181
# Include What You Use
8282
if [[ "${SKIP_IWYU}" == "" ]]; then
83-
# Remove .h, .hpp, and .cu files from the modified list
8483
shopt -s extglob
85-
IWYU_MODIFIED_FILES=( "${MRC_MODIFIED_FILES[@]/*.@(h|hpp|cu)/}" )
84+
IWYU_MODIFIED_FILES=( "${MRC_MODIFIED_FILES[@]}" )
8685

8786
if [[ -n "${IWYU_MODIFIED_FILES}" ]]; then
8887
# Get the list of compiled files relative to this directory

cpp/mrc/CMakeLists.txt

+48-40
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@
1616
# ##################################################################################################
1717
# - libmrc -----------------------------------------------------------------------------------------
1818

19+
include(GenerateExportHeader)
20+
21+
# Generate the version header file
22+
rapids_cmake_write_version_file(${CMAKE_CURRENT_BINARY_DIR}/autogenerated/include/mrc/version.hpp)
23+
1924
# Keep all source files sorted!!!
2025
add_library(libmrc
2126
src/internal/codable/codable_storage.cpp
@@ -125,6 +130,7 @@ add_library(libmrc
125130
src/public/cuda/sync.cpp
126131
src/public/edge/edge_adapter_registry.cpp
127132
src/public/edge/edge_builder.cpp
133+
src/public/exceptions/checks.cpp
128134
src/public/exceptions/exception_catcher.cpp
129135
src/public/manifold/manifold.cpp
130136
src/public/memory/buffer_view.cpp
@@ -204,6 +210,47 @@ target_compile_features(libmrc PUBLIC cxx_std_20)
204210

205211
set_target_properties(libmrc PROPERTIES OUTPUT_NAME ${PROJECT_NAME})
206212

213+
# Generates an include file for specifying external linkage since everything is hidden by default
214+
generate_export_header(libmrc
215+
NO_EXPORT_MACRO_NAME
216+
MRC_LOCAL
217+
EXPORT_FILE_NAME
218+
"${CMAKE_CURRENT_BINARY_DIR}/autogenerated/include/mrc/export.h"
219+
)
220+
221+
# ##################################################################################################
222+
# - source information -----------------------------------------------------------------------------
223+
224+
# Ideally, we dont use glob here. But there is no good way to guarantee you dont miss anything like *.cpp
225+
file(GLOB_RECURSE libmrc_public_headers
226+
LIST_DIRECTORIES FALSE
227+
CONFIGURE_DEPENDS
228+
"${CMAKE_CURRENT_SOURCE_DIR}/include/mrc/*"
229+
)
230+
231+
# Add headers to target sources file_set so they can be installed
232+
# https://discourse.cmake.org/t/installing-headers-the-modern-way-regurgitated-and-revisited/3238/3
233+
target_sources(libmrc
234+
PUBLIC
235+
FILE_SET public_headers
236+
TYPE HEADERS
237+
BASE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/include"
238+
FILES
239+
${libmrc_public_headers}
240+
)
241+
242+
# Add generated headers to fileset
243+
target_sources(libmrc
244+
PUBLIC
245+
FILE_SET public_headers
246+
TYPE HEADERS
247+
BASE_DIRS
248+
"${CMAKE_CURRENT_BINARY_DIR}/autogenerated/include"
249+
FILES
250+
"${CMAKE_CURRENT_BINARY_DIR}/autogenerated/include/mrc/version.hpp"
251+
"${CMAKE_CURRENT_BINARY_DIR}/autogenerated/include/mrc/export.h"
252+
)
253+
207254
# ##################################################################################################
208255
# - install targets --------------------------------------------------------------------------------
209256
rapids_cmake_install_lib_dir(lib_dir)
@@ -215,12 +262,7 @@ install(
215262
DESTINATION ${lib_dir}
216263
EXPORT ${PROJECT_NAME}-exports
217264
COMPONENT Core
218-
)
219-
220-
install(
221-
DIRECTORY include/
222-
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
223-
COMPONENT Core
265+
FILE_SET public_headers
224266
)
225267

226268
# ##################################################################################################
@@ -234,37 +276,3 @@ endif()
234276
if(MRC_BUILD_BENCHMARKS)
235277
add_subdirectory(benchmarks)
236278
endif()
237-
238-
# ##################################################################################################
239-
# - install export ---------------------------------------------------------------------------------
240-
set(doc_string
241-
[=[
242-
Provide targets for mrc.
243-
]=])
244-
245-
set(code_string "")
246-
247-
set(rapids_project_version_compat SameMinorVersion)
248-
249-
# Need to explicitly set VERSION ${PROJECT_VERSION} here since rapids_cmake gets
250-
# confused with the `RAPIDS_VERSION` variable we use
251-
rapids_export(INSTALL ${PROJECT_NAME}
252-
EXPORT_SET ${PROJECT_NAME}-exports
253-
GLOBAL_TARGETS libmrc
254-
VERSION ${PROJECT_VERSION}
255-
NAMESPACE mrc::
256-
DOCUMENTATION doc_string
257-
FINAL_CODE_BLOCK code_string
258-
)
259-
260-
# ##################################################################################################
261-
# - build export ----------------------------------------------------------------------------------
262-
rapids_export(BUILD ${PROJECT_NAME}
263-
EXPORT_SET ${PROJECT_NAME}-exports
264-
GLOBAL_TARGETS libmrc
265-
VERSION ${PROJECT_VERSION}
266-
LANGUAGES C CXX CUDA
267-
NAMESPACE mrc::
268-
DOCUMENTATION doc_string
269-
FINAL_CODE_BLOCK code_string
270-
)

cpp/mrc/include/mrc/api.hpp

-77
This file was deleted.

cpp/mrc/include/mrc/channel/status.hpp

+24-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* SPDX-FileCopyrightText: Copyright (c) 2021-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+
* SPDX-FileCopyrightText: Copyright (c) 2021-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
33
* SPDX-License-Identifier: Apache-2.0
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -17,6 +17,8 @@
1717

1818
#pragma once
1919

20+
#include <ostream>
21+
2022
namespace mrc::channel {
2123

2224
enum class Status
@@ -29,4 +31,25 @@ enum class Status
2931
error
3032
};
3133

34+
static inline std::ostream& operator<<(std::ostream& os, const Status& s)
35+
{
36+
switch (s)
37+
{
38+
case Status::success:
39+
return os << "success";
40+
case Status::empty:
41+
return os << "empty";
42+
case Status::full:
43+
return os << "full";
44+
case Status::closed:
45+
return os << "closed";
46+
case Status::timeout:
47+
return os << "timeout";
48+
case Status::error:
49+
return os << "error";
50+
default:
51+
throw std::logic_error("Unsupported channel::Status enum. Was a new value added recently?");
52+
}
3253
}
54+
55+
} // namespace mrc::channel

cpp/mrc/include/mrc/core/fiber_pool.hpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* SPDX-FileCopyrightText: Copyright (c) 2021-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+
* SPDX-FileCopyrightText: Copyright (c) 2021-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
33
* SPDX-License-Identifier: Apache-2.0
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -43,14 +43,14 @@ class FiberPool
4343
[[nodiscard]] virtual std::size_t thread_count() const = 0;
4444

4545
template <class F, class... ArgsT>
46-
auto enqueue(std::uint32_t index, F&& f, ArgsT&&... args) -> Future<typename std::result_of<F(ArgsT...)>::type>
46+
auto enqueue(std::uint32_t index, F&& f, ArgsT&&... args) -> Future<typename std::invoke_result_t<F, ArgsT...>>
4747
{
4848
return task_queue(index).enqueue(f, std::forward<ArgsT>(args)...);
4949
}
5050

5151
template <class MetaDataT, class F, class... ArgsT>
5252
auto enqueue(std::uint32_t index, MetaDataT&& md, F&& f, ArgsT&&... args)
53-
-> Future<typename std::result_of<F(ArgsT...)>::type>
53+
-> Future<typename std::invoke_result_t<F, ArgsT...>>
5454
{
5555
return task_queue(index).enqueue(std::forward<MetaDataT>(md), std::forward<F>(f), std::forward<ArgsT>(args)...);
5656
}

0 commit comments

Comments
 (0)