Skip to content

Commit

Permalink
Holoscan SDK v2.6.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: Shekhar Dwivedi <[email protected]>
Co-authored by: Soham Sinha <[email protected]>
Co-authored by: Tom Birdsong <[email protected]>
Co-authored by: Wendell Hom <[email protected]>
  • Loading branch information
tbirdso committed Oct 29, 2024
1 parent f3d80c6 commit 2eb3860
Show file tree
Hide file tree
Showing 462 changed files with 7,425 additions and 3,330 deletions.
23 changes: 23 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -1520,6 +1520,29 @@
}
]
},
{
"name": "(gdb) Holoinfer: tests",
"type": "cppdbg",
"request": "launch",
"program": "${command:cmake.buildDirectory}/gtests/HOLOINFER_TEST",
"args": [],
"stopAtEntry": false,
"cwd": "${command:cmake.buildDirectory}",
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
},
{
"description": "Set Disassembly Flavor to Intel",
"text": "-gdb-set disassembly-flavor intel",
"ignoreFailures": true
}
]
},
{
"name": "(gdb) Holoviz: functional tests",
"type": "cppdbg",
Expand Down
5 changes: 4 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,10 @@
"ranges": "cpp",
"barrier": "cpp",
"latch": "cpp",
"syncstream": "cpp"
"syncstream": "cpp",
"__functional_base_03": "cpp",
"annotated_ptr": "cpp",
"stream_ref": "cpp"
},
"git.alwaysSignOff": true,
"git.untrackedChanges": "separate",
Expand Down
13 changes: 13 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ option(HOLOSCAN_DOWNLOAD_DATASETS "Download SDK Datasets" ON)
option(HOLOSCAN_BUILD_TESTS "Build Holoscan SDK Tests" ON)
option(HOLOSCAN_USE_CCACHE "Use ccache for building Holoscan SDK" OFF)
option(HOLOSCAN_INSTALL_EXAMPLE_SOURCE "Install the example source code" ON)
option(HOLOSCAN_ENABLE_CLANG_TIDY "Enable use of clang-tidy" OFF)

# ##############################################################################
# # Prerequisite statements
Expand Down Expand Up @@ -254,6 +255,12 @@ install(DIRECTORY ${cli11_SOURCE_DIR}/include/CLI/
COMPONENT holoscan-core
)

# Copy bundled spdlog headers
install(DIRECTORY ${spdlog_SOURCE_DIR}/include/spdlog/
DESTINATION include/3rdparty/spdlog
COMPONENT holoscan-core
)

# Copy version file
install(FILES ${${HOLOSCAN_PACKAGE_NAME}_BINARY_DIR}/include/holoscan/version_config.hpp
DESTINATION include/holoscan
Expand All @@ -268,6 +275,7 @@ install(DIRECTORY
${GXF_INCLUDE_DIR}/gxf/cuda
${GXF_INCLUDE_DIR}/gxf/logger
${GXF_INCLUDE_DIR}/gxf/multimedia
${GXF_INCLUDE_DIR}/gxf/rmm
${GXF_INCLUDE_DIR}/gxf/serialization
${GXF_INCLUDE_DIR}/gxf/std
${GXF_INCLUDE_DIR}/gxf/ucx
Expand Down Expand Up @@ -438,6 +446,11 @@ 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
3 changes: 2 additions & 1 deletion CPPLINT.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# mark cpp and cu files as header too so build/include_what_you_use will be applied
headers=cpp,cu,cuh,h,hpp
filter=-build/header_guard,-readability/todo,-runtime/references,-build/c++11,-runtime/int,-build/include_subdir,-build/namespaces,-readability/casting
# need -readability/nolint to ignore unrecognized NOLINT categories from clang-tidy
filter=-build/header_guard,-readability/todo,-readability/nolint,-runtime/references,-build/c++11,-runtime/int,-build/include_subdir,-build/namespaces,-readability/casting
# CPPLINT.cfg file's 'exclude_files' option works only for file/folder names in the same directory as the .cfg file
# See https://github.com/google/styleguide/issues/220 for more details
exclude_files=\.cache|build|build-|install|data
Expand Down
17 changes: 9 additions & 8 deletions DEVELOP.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,16 @@ To build the Holoscan SDK on a local environment, the following versions of dev
| Dependency | Min version | Needed by | Dockerfile stage |
|---|---|---|---|
| CUDA | 12.2 | Core SDK | base |
| CUDA | 12.6 | Core SDK | base |
| gRPC | 1.54.2 | Core SDK | grpc-builder |
| UCX | 1.15.0 | Core SDK | ucx-builder |
| GXF | 4.0 | Core SDK | gxf-downloader |
| MOFED | 23.07 | ConnectX | mofed-installer |
| TensorRT | 8.6.1 | Inference operator | base |
| ONNX Runtime | 1.15.1 | Inference operator | onnxruntime-downloader |
| LibTorch | 2.1.0 | Inference operator<br>(torch plugin) | torch-downloader-[x86_64\|arm64] |
| TorchVision | 0.16.0 | Inference operator<br>(torch plugin) | torchvision-downloader-[x86_64\|arm64] |
| UCX | 1.17.0 | Core SDK | base |
| GXF | 4.1 | Core SDK | gxf-downloader |
| MOFED | 24.07 | ConnectX | mofed-installer |
| TensorRT | 10.3 | Inference operator | base |
| NVPL | 24.03 | LibTorch | build |
| ONNX Runtime | 1.18.1 | Inference operator | onnxruntime-downloader |
| LibTorch | 2.5.0 | Inference operator<br>(torch plugin) | torch-downloader-[x86_64\|arm64] |
| TorchVision | 0.20.0 | Inference operator<br>(torch plugin) | torchvision-downloader-[x86_64\|arm64] |
| Vulkan SDK | 1.3.216 | Holoviz operator | vulkansdk-builder |
| Vulkan loader and<br>validation layers | 1.3.204 | Holoviz operator | dev |
| spirv-tools | 2022.1 | Holoviz operator | dev |
Expand Down
105 changes: 50 additions & 55 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,19 @@
############################################################
# Dependencies ending in _YY.MM are built or extracted from
# the TensorRT or PyTorch NGC containers of that same version
ARG ONNX_RUNTIME_VERSION=1.15.1_23.08
ARG LIBTORCH_VERSION=2.1.0_23.08
ARG TORCHVISION_VERSION=0.16.0_23.08
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 UCX_VERSION=1.15.0
ARG GXF_VERSION=4.0_20240409_bc03d9d
ARG MOFED_VERSION=23.10-2.1.3.1
ARG GXF_VERSION=447_20241004_bf72709
ARG MOFED_VERSION=24.07-0.6.1.0

############################################################
# Base image
############################################################
ARG GPU_TYPE=dgpu
FROM nvcr.io/nvidia/tensorrt:23.08-py3 AS dgpu_base
FROM nvcr.io/nvidia/tensorrt:23.12-py3-igpu AS igpu_base
FROM nvcr.io/nvidia/tensorrt:24.08-py3 AS dgpu_base
FROM nvcr.io/nvidia/tensorrt:24.08-py3-igpu AS igpu_base
FROM ${GPU_TYPE}_base AS base

ARG DEBIAN_FRONTEND=noninteractive
Expand Down Expand Up @@ -84,7 +83,7 @@ ARG ONNX_RUNTIME_VERSION
# note: built with CUDA and TensorRT providers
WORKDIR /opt/onnxruntime
RUN curl -S -L -# -o ort.tgz \
https://edge.urm.nvidia.com/artifactory/sw-holoscan-thirdparty-generic-local/onnxruntime/onnxruntime-${ONNX_RUNTIME_VERSION}-cuda-12.2-$(uname -m).tar.gz
https://edge.urm.nvidia.com/artifactory/sw-holoscan-thirdparty-generic-local/onnxruntime/onnxruntime-${ONNX_RUNTIME_VERSION}-$(uname -m).tar.gz
RUN mkdir -p ${ONNX_RUNTIME_VERSION}
RUN tar -xf ort.tgz -C ${ONNX_RUNTIME_VERSION} --strip-components 2

Expand All @@ -96,15 +95,20 @@ ARG LIBTORCH_VERSION
ARG GPU_TYPE

# Download libtorch binaries from artifactory
# note: extracted from nvcr.io/nvidia/pytorch:23.07-py3
# note: extracted from nvcr.io/nvidia/pytorch:24.08-py3
WORKDIR /opt/libtorch/
RUN ARCH=$(uname -m) && if [ "$ARCH" = "aarch64" ]; then ARCH="${ARCH}-${GPU_TYPE}"; fi && \
curl -S -# -o libtorch.tgz -L \
https://edge.urm.nvidia.com/artifactory/sw-holoscan-thirdparty-generic-local/libtorch/libtorch-${LIBTORCH_VERSION}-${ARCH}.tar.gz
RUN mkdir -p ${LIBTORCH_VERSION}
RUN tar -xf libtorch.tgz -C ${LIBTORCH_VERSION} --strip-components 1
# Remove kineto from config to remove warning, not needed by holoscan

# Patch step to remove kineto from config to remove warning, not needed by holoscan
RUN find . -type f -name "*Config.cmake" -exec sed -i '/kineto/d' {} +
# Patch step for CMake configuration warning
COPY patches/libtorch.Caffe2.cmake.patch ${LIBTORCH_VERSION}/share/cmake/Caffe2/cuda.patch
WORKDIR ${LIBTORCH_VERSION}
RUN patch -p1 < share/cmake/Caffe2/cuda.patch

############################################################
# TorchVision
Expand Down Expand Up @@ -172,44 +176,21 @@ RUN UBUNTU_VERSION=$(cat /etc/lsb-release | grep DISTRIB_RELEASE | cut -d= -f2)
############################################################
# UCX
############################################################
FROM mofed-installer AS ucx-builder
ARG UCX_VERSION

# Clone
WORKDIR /opt/ucx/
RUN git clone --depth 1 --branch v${UCX_VERSION} https://github.com/openucx/ucx.git src

# Patch
WORKDIR /opt/ucx/src
RUN curl -L https://github.com/openucx/ucx/pull/9341.patch | git apply
FROM build-tools AS ucx-patcher

# Prerequisites to build
RUN apt-get update \
&& apt-get install --no-install-recommends -y \
libtool="2.4.6-*" \
automake="1:1.16.5-*" \
&& rm -rf /var/lib/apt/lists/*

# Build and install
RUN ./autogen.sh
WORKDIR /opt/ucx/build
RUN ../src/contrib/configure-release-mt --with-cuda=/usr/local/cuda-12 \
--prefix=/opt/ucx/${UCX_VERSION}
RUN make -j $(( `nproc` > ${MAX_PROC} ? ${MAX_PROC} : `nproc` )) install

# Apply patches for import and run
# The base container provides custom builds of HPCX libraries without
# the necessary rpath for non-containerized applications. We patch RPATH
# for portability when we later repackage these libraries for distribution
# outside of the container.
WORKDIR /opt/ucx/${UCX_VERSION}
# patch cmake config
RUN sed -i "s|set(prefix.*)|set(prefix \"$(pwd)\")|" lib/cmake/ucx/ucx-targets.cmake
# patch rpath (relative to ORIGIN)
RUN patchelf --set-rpath '$ORIGIN' lib/libuc*.so*
RUN patchelf --set-rpath '$ORIGIN:$ORIGIN/..' lib/ucx/libuc*.so*
RUN patchelf --set-rpath '$ORIGIN/../lib' bin/*
RUN patchelf --set-rpath '$ORIGIN' /opt/hpcx/ucx/lib/libuc*.so* \
&& patchelf --set-rpath '$ORIGIN:$ORIGIN/..' /opt/hpcx/ucx/lib/ucx/libuc*.so* \
&& patchelf --set-rpath '$ORIGIN/../lib' /opt/hpcx/ucx/bin/*

############################################################
# GXF
############################################################
FROM base AS gxf-builder
FROM base AS gxf-downloader
ARG GXF_VERSION

WORKDIR /opt/nvidia/gxf
Expand Down Expand Up @@ -259,22 +240,21 @@ ENV GRPC=/opt/grpc/${GRPC_VERSION}
COPY --from=grpc-builder ${GRPC} ${GRPC}
ENV CMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH}:${GRPC}"

# Copy UCX
ARG UCX_VERSION
ENV UCX=/opt/ucx/${UCX_VERSION}
COPY --from=ucx-builder ${UCX} ${UCX}
ENV PATH="${PATH}:${UCX}/bin"
ENV CMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH}:${UCX}"
# remove older version of UCX in hpcx install
RUN rm -rf /opt/hpcx/ucx /usr/local/ucx
RUN unset OPENUCX_VERSION
# required for gxf_ucx.so to find ucx
ENV LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${UCX}/lib"
# Copy UCX and set other HPC-X runtime paths
ENV HPCX=/opt/hpcx
COPY --from=ucx-patcher ${HPCX}/ucx ${HPCX}/ucx
ENV PATH="${PATH}:${HPCX}/ucx/bin:${HPCX}/ucc/bin:${HPCX}/ompi/bin"
ENV CMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH}:${HPCX}/ucx"
# Constrain HPCX's ld config to Holoscan/Torch explicit dependencies,
# to prevent inadvertently picking up non-expected libraries
RUN echo "${HPCX}/ucx/lib" > /etc/ld.so.conf.d/hpcx.conf \
&& echo "${HPCX}/ucc/lib" >> /etc/ld.so.conf.d/hpcx.conf \
&& echo "${HPCX}/ompi/lib" >> /etc/ld.so.conf.d/hpcx.conf

# Copy GXF
ARG GXF_VERSION
ENV GXF=/opt/nvidia/gxf/${GXF_VERSION}
COPY --from=gxf-builder ${GXF} ${GXF}
COPY --from=gxf-downloader ${GXF} ${GXF}
ENV CMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH}:${GXF}"

# Setup Docker & NVIDIA Container Toolkit's apt repositories to enable DooD
Expand All @@ -289,6 +269,21 @@ RUN install -m 0755 -d /etc/apt/keyrings \
"$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \
tee /etc/apt/sources.list.d/docker.list > /dev/null

# Install NVIDIA Performance Libraries on arm64 dGPU platform
# as a runtime requirement for the Holoinfer `libtorch` backend (2.5.0).
ARG GPU_TYPE
RUN if [[ $(uname -m) = "aarch64" && ${GPU_TYPE} = "dgpu" ]]; then \
curl -L https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/sbsa/cuda-keyring_1.1-1_all.deb -O \
&& dpkg -i cuda-keyring_1.1-1_all.deb \
&& apt-get update \
&& apt-get install --no-install-recommends -y \
nvpl-blas=0.2.0.1-* \
nvpl-lapack=0.2.2.1-* \
&& apt-get purge -y cuda-keyring \
&& rm cuda-keyring_1.1-1_all.deb \
&& rm -rf /var/lib/apt/lists/* \
; fi

# APT INSTALLS
# valgrind - dynamic analysis
# clang-tidy - static analysis
Expand Down
14 changes: 9 additions & 5 deletions NOTICE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ expected (https://github.com/TartanLlama/expected)
Licensed under CC0-1.0 (https://github.com/TartanLlama/expected/blob/v1.1.0/COPYING)

fmt (https://github.com/fmtlib/fmt)
Copyright (c) 2012 - present, Victor Zverovich
Licensed under MIT (https://github.com/fmtlib/fmt/blob/8.1.1/LICENSE.rst)
Copyright (c) 2012 - present, Victor Zverovich and {fmt} contributors
Licensed under MIT (https://github.com/fmtlib/fmt/blob/10.1.1/LICENSE.rst)

GLFW (https://www.glfw.org/)
Copyright (c) 2002-2006 Marcus Geelnard
Expand Down Expand Up @@ -237,7 +237,7 @@ Licensed under Apache-2.0 (http://www.apache.org/licenses/LICENSE-2.0)

ONNX Runtime (https://github.com/microsoft/onnxruntime)
Copyright (c) Microsoft Corporation
Licensed under MIT (https://github.com/microsoft/onnxruntime/blob/v1.15.1/LICENSE)
Licensed under MIT (https://github.com/microsoft/onnxruntime/blob/v1.18.1/LICENSE)

openblas (https://packages.ubuntu.com/jammy/libopenblas0)
2011-2021 The OpenBLAS Project
Expand Down Expand Up @@ -275,12 +275,16 @@ RAPIDS rapids-cmake (https://github.com/rapidsai/rapids-cmake)
Copyright (c) 2020-2021, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
Licensed under Apache-2.0 (https://github.com/rapidsai/rapids-cmake/blob/branch-23.06/LICENSE)

RMM (https://github.com/rapidsai/rmm)
Copyright (c) 2018-2024, NVIDIA CORPORATION.
Licensed under Apache 2.0 (https://github.com/rapidsai/rmm/blob/branch-24.04/LICENSE)

Google Fonts Roboto (https://github.com/googlefonts/roboto/releases/download/v2.138/roboto-android.zip)
Licensed under Apache-2.0 (https://github.com/googlefonts/roboto/blob/v2.138/LICENSE)

spdlog (https://github.com/gabime/spdlog)
Copyright (c) 2016 Gabi Melman.
Licensed under MIT (https://github.com/gabime/spdlog/blob/v1.10.0/LICENSE)
Licensed under MIT (https://github.com/gabime/spdlog/blob/v1.12.0/LICENSE)

spirv-tools (https://packages.ubuntu.com/jammy/spirv-tools)
2016-2017 Google Inc.
Expand Down Expand Up @@ -310,7 +314,7 @@ Copyright (C) 2016-2020 Advanced Micro Devices, Inc. All rights reserved.
Copyright (C) 2019 UChicago Argonne, LLC. All rights reserved.
Copyright (C) 2020 Huawei Technologies Co., Ltd. All rights reserved.
Copyright (C) 2016-2020 Stony Brook University. All rights reserved.
Licensed under BSD-3-clause (https://github.com/openucx/ucx/blob/v1.15.0-rc2/LICENSE)
Licensed under BSD-3-clause (https://github.com/openucx/ucx/blob/v1.17.0/LICENSE)

v4l-utils (https://packages.ubuntu.com/jammy/v4l-utils)
2006-2010 Mauro Carvalho Chehab <[email protected]>
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ The Holoscan User Guide includes:
- Requirements and setup steps;
- Detailed SDK documentation, including a developer introduction, examples, and API details.

We also recommend visiting [NVIDIA HoloHub](https://nvidia-holoscan.github.io/holohub/) to view
We also recommend visiting [NVIDIA HoloHub](https://github.com/nvidia-holoscan/holohub) to view
community projects and reusable components available for your Holoscan project.

## Obtaining the Holoscan SDK
Expand Down Expand Up @@ -54,7 +54,7 @@ and may include them in Holoscan SDK releases at our discretion. Please refer to

### Relation to NVIDIA Clara

In previous releases, the prefix [`Clara`](https://developer.nvidia.com/industries/healthcare) was used to define Holoscan as a platform designed initially for [medical devices](https://www.nvidia.com/en-us/clara/developer-kits/). Starting with version 0.4.0, the Holoscan SDK is built to be domain-agnostic and can be used to build sensor AI applications in multiple domains. Domain specific content will be hosted on the [HoloHub](https://nvidia-holoscan.github.io/holohub) repository.
In previous releases, the prefix [`Clara`](https://developer.nvidia.com/industries/healthcare) was used to define Holoscan as a platform designed initially for [medical devices](https://www.nvidia.com/en-us/clara/developer-kits/). Starting with version 0.4.0, the Holoscan SDK is built to be domain-agnostic and can be used to build sensor AI applications in multiple domains. Domain specific content will be hosted on the [HoloHub](https://github.com/nvidia-holoscan/holohub) repository.

### Repository structure

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.5.0
2.6.0
6 changes: 3 additions & 3 deletions cmake/deps/fmt_rapids.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -16,13 +16,13 @@
# https://docs.rapids.ai/api/rapids-cmake/stable/command/rapids_cpm_find.html
include(${rapids-cmake-dir}/cpm/find.cmake)

rapids_cpm_find(fmt 8.1.1
rapids_cpm_find(fmt 10.1.1
GLOBAL_TARGETS fmt fmt-header-only
BUILD_EXPORT_SET ${HOLOSCAN_PACKAGE_NAME}-exports
CPM_ARGS

GITHUB_REPOSITORY fmtlib/fmt
GIT_TAG 8.1.1
GIT_TAG 10.1.1
GIT_SHALLOW TRUE

OPTIONS
Expand Down
Loading

0 comments on commit 2eb3860

Please sign in to comment.