Skip to content

Commit

Permalink
Holoscan SDK v2.8.0 Release
Browse files Browse the repository at this point in the history
Co-authored-by: Alexis Girault <[email protected]>
Co-authored-by: Andreas Heumann <[email protected]>
Co-authored-by: Gigon Bae <[email protected]>
Co-authored-by: Gregory Lee <[email protected]>
Co-authored-by: Julien Jomier <[email protected]>
Co-authored-by: Tom Birdsong <[email protected]>
Co-authored-by: Victor Chang <[email protected]>
Co-authored-by: Wendell Hom <[email protected]>
  • Loading branch information
8 people committed Jan 2, 2025
1 parent 68c7b5e commit c6647da
Show file tree
Hide file tree
Showing 171 changed files with 5,050 additions and 421 deletions.
224 changes: 224 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,177 @@
}
]
},
{
"name": "(gdb) examples/conditions/multi_message/multi_message_per_receiver/cpp/",
"type": "cppdbg",
"request": "launch",
"program": "${command:cmake.buildDirectory}/examples/conditions/multi_message/cpp/multi_message_per_receiver",
"args": [],
"stopAtEntry": false,
"cwd": "${command:cmake.buildDirectory}",
"environment": [
{
"name": "HOLOSCAN_LOG_LEVEL",
"value": "DEBUG"
},
{
"name": "HOLOSCAN_EXECUTOR_LOG_LEVEL",
"value": "INFO"
},
],
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
},
{
"name": "(gdb) examples/conditions/multi_message/multi_message_per_receiver/python",
"type": "cppdbg",
"request": "launch",
"program": "/usr/bin/bash",
"args": [
"${workspaceFolder}/${env:HOLOSCAN_PUBLIC_FOLDER}/.vscode/debug_python",
"${workspaceFolder}/${env:HOLOSCAN_PUBLIC_FOLDER}/examples/conditions/multi_message/python/multi_message_per_receiver.py",
],
"stopAtEntry": false,
"cwd": "${command:cmake.buildDirectory}",
"environment": [
{
"name": "HOLOSCAN_LOG_LEVEL",
"value": "DEBUG"
},
{
"name": "PYTHONPATH",
"value": "${command:cmake.buildDirectory}/python/lib"
},
],
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
},
{
"name": "(gdb) examples/conditions/multi_message/multi_message_sum_of_all/cpp/",
"type": "cppdbg",
"request": "launch",
"program": "${command:cmake.buildDirectory}/examples/conditions/multi_message/cpp/multi_message_sum_of_all",
"args": [],
"stopAtEntry": false,
"cwd": "${command:cmake.buildDirectory}",
"environment": [
{
"name": "HOLOSCAN_LOG_LEVEL",
"value": "DEBUG"
},
{
"name": "HOLOSCAN_EXECUTOR_LOG_LEVEL",
"value": "INFO"
},
],
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
},
{
"name": "(gdb) examples/conditions/multi_message/multi_message_sum_of_all/python",
"type": "cppdbg",
"request": "launch",
"program": "/usr/bin/bash",
"args": [
"${workspaceFolder}/${env:HOLOSCAN_PUBLIC_FOLDER}/.vscode/debug_python",
"${workspaceFolder}/${env:HOLOSCAN_PUBLIC_FOLDER}/examples/conditions/multi_message/python/multi_message_sum_of_all.py",
],
"stopAtEntry": false,
"cwd": "${command:cmake.buildDirectory}",
"environment": [
{
"name": "HOLOSCAN_LOG_LEVEL",
"value": "DEBUG"
},
{
"name": "PYTHONPATH",
"value": "${command:cmake.buildDirectory}/python/lib"
},
],
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
},
{
"name": "(gdb) examples/conditions/multi_message/single_message_timeout/cpp/",
"type": "cppdbg",
"request": "launch",
"program": "${command:cmake.buildDirectory}/examples/conditions/multi_message/cpp/single_message_timeout",
"args": [],
"stopAtEntry": false,
"cwd": "${command:cmake.buildDirectory}",
"environment": [
{
"name": "HOLOSCAN_LOG_LEVEL",
"value": "DEBUG"
},
{
"name": "HOLOSCAN_EXECUTOR_LOG_LEVEL",
"value": "INFO"
},
],
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
},
{
"name": "(gdb) examples/conditions/multi_message/single_message_timeout/python",
"type": "cppdbg",
"request": "launch",
"program": "/usr/bin/bash",
"args": [
"${workspaceFolder}/${env:HOLOSCAN_PUBLIC_FOLDER}/.vscode/debug_python",
"${workspaceFolder}/${env:HOLOSCAN_PUBLIC_FOLDER}/examples/conditions/multi_message/python/single_message_timeout.py",
],
"stopAtEntry": false,
"cwd": "${command:cmake.buildDirectory}",
"environment": [
{
"name": "HOLOSCAN_LOG_LEVEL",
"value": "DEBUG"
},
{
"name": "PYTHONPATH",
"value": "${command:cmake.buildDirectory}/python/lib"
},
],
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
},
{
"name": "(gdb) examples/conditions/periodic/cpp",
"type": "cppdbg",
Expand Down Expand Up @@ -1187,6 +1358,59 @@
}
]
},
{
"name": "(gdb) examples/resources/thread_pool/cpp",
"type": "cppdbg",
"request": "launch",
"program": "${command:cmake.buildDirectory}/examples/resources/thread_pool/cpp/ping_simple_thread_pool",
"args": [],
"stopAtEntry": false,
"cwd": "${command:cmake.buildDirectory}",
"environment": [
{
"name": "HOLOSCAN_LOG_LEVEL",
"value": "DEBUG"
},
],
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
},
{
"name": "(gdb) examples/resources/thread_pool/python",
"type": "cppdbg",
"request": "launch",
"program": "/usr/bin/bash",
"args": [
"${workspaceFolder}/${env:HOLOSCAN_PUBLIC_FOLDER}/.vscode/debug_python",
"${workspaceFolder}/${env:HOLOSCAN_PUBLIC_FOLDER}/examples/resources/thread_pool/python/ping_simple_thread_pool.py",
],
"stopAtEntry": false,
"cwd": "${command:cmake.buildDirectory}",
"environment": [
{
"name": "HOLOSCAN_LOG_LEVEL",
"value": "DEBUG"
},
{
"name": "PYTHONPATH",
"value": "${command:cmake.buildDirectory}/python/lib"
},
],
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
},
{
"name": "(gdb) examples/tensor_interop/cpp",
"type": "cppdbg",
Expand Down
18 changes: 13 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,19 @@ include(cmake/setup_dependencies.cmake)
# ##############################################################################
add_subdirectory(modules)

# If enabling clang-tidy
if(HOLOSCAN_ENABLE_CLANG_TIDY)
# TODO: move above add_subdirectory(modules) later
# Want to exclude */.cache/* */_deps/* */thirdparty/*
# but negative lookahead assertions are not supported for --header-filter
# and --exclude-header-filter is not available until clang-tidy>=19.0.
set(CMAKE_CXX_CLANG_TIDY
clang-tidy
"--checks='*,-llvmlibc-restrict-system-libc-headers,-abseil-string-find-str-contains,-fuchsia-default-arguments-calls,-llvmlibc-implementation-in-namespace,-readability-magic-numbers,-readability-identifier-length,-readability-magic-numbers,-cppcoreguidelines-avoid-magic-numbers,-altera-unroll-loops,-llvmlibc-callee-namespace,-google-build-using-namespace,-llvm-include-order,-bugprone-exception-escape,-cppcoreguidelines-pro-bounds-pointer-arithmetic,-modernize-use-trailing-return-type,-altera-id-dependent-backward-branch,-fuchsia-default-arguments-declarations,-bugprone-easily-swappable-parameters,-clang-diagnostic-ignored-optimization-argument'"
"--extra-arg=-std=c++17"
)
endif()

# ##############################################################################
# # Build core and operators
# ##############################################################################
Expand Down Expand Up @@ -466,11 +479,6 @@ if(HOLOSCAN_BUILD_TESTS)
add_test(NAME HOLOVIZ_UNIT_TEST COMMAND holoscan::viz::unittests)
endif()

# If enabling clang-tidy
if(HOLOSCAN_ENABLE_CLANG_TIDY)
set(CMAKE_CXX_CLANG_TIDY "clang-tidy;--checks=*,-llvmlibc-restrict-system-libc-headers,-fuchsia-default-arguments-calls,-llvmlibc-implementation-in-namespace,-readability-magic-numbers,-readability-identifier-length,-readability-magic-numbers,-cppcoreguidelines-avoid-magic-numbers,-altera-unroll-loops,-llvmlibc-callee-namespace,-google-build-using-namespace,-llvm-include-order,-bugprone-exception-escape,-cppcoreguidelines-pro-bounds-pointer-arithmetic,-modernize-use-trailing-return-type,-altera-id-dependent-backward-branch,-fuchsia-default-arguments-declarations,-bugprone-easily-swappable-parameters,-clang-diagnostic-ignored-optimization-argument;--extra-arg=-std=c++17")
endif()

if(HOLOSCAN_BUILD_PYTHON)
add_subdirectory(python)
endif()
Expand Down
2 changes: 1 addition & 1 deletion DEVELOP.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ To build the Holoscan SDK on a local environment, the following versions of dev
| CUDA | 12.6 | Core SDK | base |
| gRPC | 1.54.2 | Core SDK | grpc-builder |
| UCX | 1.17.0 | Core SDK | base |
| GXF | 4.1 | Core SDK | gxf-downloader |
| GXF | 4.1.1 | Core SDK | gxf-downloader |
| MOFED | 24.07 | ConnectX | mofed-installer |
| TensorRT | 10.3 | Inference operator | base |
| NVPL | 24.03 | LibTorch | build |
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ ARG ONNX_RUNTIME_VERSION=1.18.1_38712740_24.08-cuda-12.6
ARG LIBTORCH_VERSION=2.5.0_24.08
ARG TORCHVISION_VERSION=0.20.0_24.08
ARG GRPC_VERSION=1.54.2
ARG GXF_VERSION=447_20241029_bf72709
ARG GXF_VERSION=4.1.1.4_20241210_dc72072
ARG MOFED_VERSION=24.07-0.6.1.0

############################################################
Expand Down Expand Up @@ -195,7 +195,7 @@ ARG GXF_VERSION
WORKDIR /opt/nvidia/gxf
RUN if [ $(uname -m) = "aarch64" ]; then ARCH=arm64; else ARCH=x86_64; fi \
&& curl -S -# -L -o gxf.tgz \
https://edge.urm.nvidia.com/artifactory/sw-holoscan-thirdparty-generic-local/gxf/gxf_${GXF_VERSION}_holoscan-sdk_${ARCH}.tar.gz
https://urm.nvidia.com/artifactory/sw-holoscan-thirdparty-generic-local/gxf/gxf_${GXF_VERSION}_holoscan-sdk_${ARCH}.tar.gz
RUN mkdir -p ${GXF_VERSION}
RUN tar xzf gxf.tgz -C ${GXF_VERSION} --strip-components 1

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.7.0
2.8.0
3 changes: 1 addition & 2 deletions cmake/modules/HoloscanCPack.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,7 @@ set(CPACK_COMPONENTS_ALL

# - cuda-nvcc: needed to find Holoscan with CMake (FindCUDAToolkit requirement)
# Note: not needed at runtime
# - cuda-cudart-dev: needed for holoscan core and some operators
# Note: only cuda-cudart (non dev) needed at runtime
# - cuda-cudart-dev: needed for holoscan core and some operators at build time and by Cupy at runtime
set(CPACK_DEBIAN_PACKAGE_DEPENDS
"cuda-nvcc-12-6 | cuda-nvcc-12-9 | cuda-nvcc-12-8 | cuda-nvcc-12-7 | cuda-nvcc-12-5 | cuda-nvcc-12-4 | cuda-nvcc-12-3 | cuda-nvcc-12-2 |cuda-nvcc-12-1 | cuda-nvcc-12-0, \
cuda-cudart-dev-12-6 | libcudart.so.12-dev"
Expand Down
8 changes: 7 additions & 1 deletion docs/cli/run.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ spec:
## Synopsis
`holoscan run` [](#cli-help) [](#cli-log-level) [](#cli-run-address) [](#cli-run-driver) [](#cli-run-input) [](#cli-run-output) [](#cli-run-fragments) [](#cli-run-worker) [](#cli-run-worker-address) [](#cli-run-config) [](#cli-run-network) [](#cli-run-nic) [](#cli-run-use-all-nics) [](#cli-run-render) [](#cli-run-quiet) [](#cli-run-shm-size)[](#cli-run-terminal) [](#cli-run-device) [](#cli-run-gpu) [](#cli-run-uid) [](#cli-run-gid)[](#cli-run-image-tag)
`holoscan run` [](#cli-help) [](#cli-log-level) [](#cli-run-address) [](#cli-run-driver) [](#cli-run-input) [](#cli-run-output) [](#cli-run-fragments) [](#cli-run-worker) [](#cli-run-worker-address) [](#cli-run-config) [](#cli-run-health-check) [](#cli-run-network) [](#cli-run-nic) [](#cli-run-use-all-nics) [](#cli-run-render) [](#cli-run-quiet) [](#cli-run-shm-size)[](#cli-run-terminal) [](#cli-run-device) [](#cli-run-gpu) [](#cli-run-uid) [](#cli-run-gid)[](#cli-run-image-tag)

## Examples

Expand Down Expand Up @@ -124,6 +124,12 @@ Ensure that the IP address is not blocked and the port is configured with the fi

Path to the application configuration file. If specified, it overrides the embedded configuration file found in the environment variable `HOLOSCAN_CONFIG_PATH`.

(#cli-run-health-check)=

### `[--health-check HEALTH_CHECK]`

Enables the health check service for [distributed applications](../holoscan_create_distributed_app.md) by setting the `HOLOSCAN_ENABLE_HEALTH_CHECK` environment variable to `true`. This allows [grpc-health-probe](https://github.com/grpc-ecosystem/grpc-health-probe) to monitor the application's liveness and readiness.

(#cli-run-network)=

### `[--network|-n NETWORK]`
Expand Down
20 changes: 19 additions & 1 deletion docs/components/conditions.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,28 @@ The following table gives a rough categorization of the available condition type
| BooleanCondition | execution-driven | operator as a whole |
| AsynchronousCondition | execution-driven | operator as a whole |

Here, the various message-driven conditions are associated with an input port (receiver) or output port (transmitter). Message-driven conditions that are associated with a single input port are assigned via the `IOSpec::condition` method ({cpp:func}`C++ <holoscan::IOSPec::condition>`/{py:func}`Python <holoscan.core.IOSpec.condition>`) method as called from an operator's `setup` ({cpp:func}`C++ <holoscan::Operator::setup>`/{py:func}`Python <holoscan.core.Operator.setup>`) method. Those associated with multiple input ports would instead be assigned via the `OperatorSpec::multi_port_condition` method ({cpp:func}`C++ <holoscan::OperatorSpec::multi_port_condition>`/{py:func}`Python <holoscan.core.OperatorSpec.multi_port_condition>`) method as called from an operator's `setup` ({cpp:func}`C++ <holoscan::Operator::setup>`/{py:func}`Python <holoscan.core.Operator.setup>`) method.
Here, the various message-driven conditions are associated with an input port (receiver) or output port (transmitter). Message-driven conditions that are associated with a single input port are typically assigned via the `IOSpec::condition` method ({cpp:func}`C++ <holoscan::IOSPec::condition>`/{py:func}`Python <holoscan.core.IOSpec.condition>`) method as called from an operator's `setup` ({cpp:func}`C++ <holoscan::Operator::setup>`/{py:func}`Python <holoscan.core.Operator.setup>`) method. Those associated with multiple input ports would instead be assigned via the `OperatorSpec::multi_port_condition` method ({cpp:func}`C++ <holoscan::OperatorSpec::multi_port_condition>`/{py:func}`Python <holoscan.core.OperatorSpec.multi_port_condition>`) method as called from an operator's `setup` ({cpp:func}`C++ <holoscan::Operator::setup>`/{py:func}`Python <holoscan.core.Operator.setup>`) method.

All other condition types are typically passed as either a positional or keyword argument during operator construction in the application's `compose` method (i.e. passed to {cpp:func}`~holoscan::Fragment::make_operator` in C++ or the operator class's constructor in Python). Once these conditions are assigned, they automatically enforce the associated criteria for that transmitter/receiver as part of the conditions controlling whether the operator will call `compute`. Due to the AND combination of conditions discussed above, all ports must meet their associated conditions in order for an operator to call `compute`.

As of Holoscan v2.8, it is also possible to add a message-based condition that takes a "receiver" or "transmitter" argument as a positional argument to `Fragment::make_operator` (C++) or the operator's constructor (Python). Any "receiver" or "transmitter" parameter of the condition should be specified via a string-valued argument that takes the name of the port to which the condition would apply. The SDK will then take care of automatically swapping in the actual underlying `Receiver` or `Transmitter` object used by the named port when the application is run. As a concrete example, if the `setup` method of an operator had set a `ConditionType::kNone` (C++) condition on an input port, but we want to add a `MessageAvailableCondition` without modifying that setup method. This could be done via:

```cpp
// assuming that an operator has an input port named "in1" we could explicitly create a condition for this port via
auto in1_condition = make_condition<MessageAvailableCondition>("in1_condition",
Arg("min_size_", static_cast<uint64_t>(1)),
Arg("receiver", "in1"));
// then `in1_condition` can be passed as an argument to the `Fragment::make_operator` call for the operator
```
or equivalently, in Python
```py
# assuming that an operator has an input port named "in1" we could explicitly create a condition for this port via
in1_condition = MessageAvailableCondition(fragment, name="in1_condition", min_size=1, receiver="in");
# then in1_condition can be passed as a positional argument to the operator's constructor
```

The `PeriodicCondition` is clock-driven. It automatically takes effect based on timing from it's associated clock. The `CountCondition` is another condition type that automatically takes effect, stopping execution of an operator after a specified count is reached.

The conditions that are marked as execution-driven, by contrast, require an application or operator thread to explicitly trigger a change in the condition. For example, the built-in `HolovizOp` operator's `compute` method implements logic to update an associated `BooleanCondition` to disable the operator when a user closes the display window. Similarly, the `AsynchronousCondition` requires some thread to emit events to trigger an update of its state.
Expand Down
Loading

0 comments on commit c6647da

Please sign in to comment.