Skip to content

v3.5.0

Choose a tag to compare

@bhashemian bhashemian released this 02 Aug 00:55
· 18 commits to main since this release
c8fcd76

Release Artifacts

See supported platforms for compatibility.

Release Notes

New Features and Improvements

Core
  • Python 3.13 support and wheel builds have been added in this release. Python 3.9 is no longer supported.

  • CUDA Managed Memory support has been added to holoscan::Tensor, UnboundedAllocator, BlockMemoryPool and the built-in operators of the SDK. This corresponds to new storage type enum value of 3 (nvidia::gxf::MemoryStorageType::kCudaManaged). This also provides interoperability with third-party tensors using DLPack's DLDeviceType::kDLCudaManaged.

  • Added support for asynchronous buffer (IOSpec::ConnectorType::kAsyncBuffer) for input and output ports. This new connector enables connecting two operators without any locks, blocking or waiting. With this buffer as a connector, a transmitter operator can emit the latest message, and a receiver operator can receive the latest message pushed by the transmitter. Connections between two operators can be configured by modifying the add_flow function in a Fragment as follows:

    In C++:

    add_flow(tx, rx, IOSpec::ConnectorType::kAsyncBuffer);
    // or with port names
    // add_flow(tx, rx, {{"out", "in"}}, IOSpec::ConnectorType::kAsyncBuffer);

    In Python:

    self.add_flow(tx, rx, IOSpec.ConnectorType.ASYNC_BUFFER)
    # or with port names
    # self.add_flow(tx, rx, {("out", "in")}, IOSpec.ConnectorType.ASYNC_BUFFER)
  • There is a new optional data logger interface method, DataLogger::log_backend_specific, which can be used to log backend-specific types (a concrete example for logging GXF Entity types is provided in the new GXFConsoleLogger).

  • (Experimental) Distributed Application Support for Services: The Fragment Service and Pose Tree features have been extended to support distributed applications, enabling automatic state synchronization across multiple fragments.

    • A new holoscan::DistributedAppService (Python: holoscan.DistributedAppService) interface has been introduced. When registered with an application, services implementing this interface are automatically managed across driver and worker fragments, with methods like driver_start/shutdown and worker_connect/disconnect being invoked by the framework.
    • The holoscan::PoseTreeManager now implements the DistributedAppService interface, enabling it to automatically synchronize pose data across all fragments of a distributed application using UCX. The API for using PoseTreeManager remains consistent for both single-node and distributed applications.
    • The UCXX library has been added as a new dependency to support this feature.
  • Changes have been made to UCX environment variables for the TCP/IP transport layer to improve performance when transmitting GPU tensors between fragments of a distributed application. If they are not already set in the user's environment, the following environment variables will be set at runtime: UCX_TCP_TX_SEG_SIZE=128k and UCX_TCP_RX_SEG_SIZE=128k. To revert to the prior defaults, please explicitly set UCX_TCP_TX_SEG_SIZE=8k and UCX_TCP_RX_SEG_SIZE=8k. In local testing with an RTX A6000 GPU, the time needed for "TCP/IP + Cuda Copy" transport of a 32 MB tensor was reduced nearly 3x with this change.

  • The default HOLOSCAN_UCX_SERIALIZATION_BUFFER_SIZE has been increased from 7168 (7kB) to 130048 (127KiB) to increase the buffer size available for sending non-tensor data between fragments of a distributed application. The user can set HOLOSCAN_UCX_SERIALIZATION_BUFFER_SIZE=7168 if they want to preserve the prior default behavior.

  • NVTX profiling when HOLOSCAN_ENABLE_PROFILE=1 is set now provides more detailed information related to emitting and receiving of messages and the use of optional metadata, stream handling and data logging features. Specifically the following are now all logged:

    • time spent on each individual emit or receive call (labeled by operator.port name)
    • time spent on metadata handling
    • time spent on CUDA stream handling
    • time spent on data logging
  • New method FlowGraph::port_map_description is added which returns a YAML formatted string containing all connection information for the graph. Specifically, for each input port, all upstream output ports connected to it are listed. Similarly, for each output port all connected downstream ports are listed.

    • This method can be accessed from an (non-distributed) application using the following APIs:

      For a non-distributed C++ application:

      // assume app is a std::shared_ptr<Application>
      auto connections = app->graph().port_map_description();

      For a non-distributed Python application:

      # assuming app is an Application instance
      connections = app.graph.port_map_description()

      For a distributed C++ application:

      // assuming std::shared_ptr<Application> app is a distributed application
      auto& fragment_graph = app->fragment_graph()
      
      // get mapping if inter-fragment connections
      auto inter_fragment_connections = fragment_graph.port_map_description();
      
      // get mappings of all within-fragment connections
      std::vector<std::string> intra_fragment_connections;
      for (const auto& fragment : fragment_graph.get_nodes()) {
        intra_fragment_connections.push_back(fragment->graph().port_map_description());
      }

      For a non-distributed Python application:

      # assuming app is a distributed Application instance
      inter_fragment_connections = app.fragment_graph.port_map_description()
      
      # get mappings of within-fragment connections for each fragment
      intra_fragment_connections = []
      for fragment in app.fragment_graph.get_nodes():
        intra_fragment_connections.append(fragment.graph.port_map_description())
    • See a concrete examples for a non-distributed application in the updated multithread example and for a distributed application in the updated video_replayer_distributed example.

    • To obtain the same connection information as returned by port_map_description, but in the form of a std::pair<output_port_mapping, input_port_mapping> where each mapping is a std::map<std::string, std::vector<std::string>>, the get_port_connectivity_maps() method can be used instead. In the Python API case, its return type is tuple[dict[str, list[str]], dict[str, list[str]]].

Operators/Resources/Conditions
  • A new data logger class, AsyncDataLoggerResource is provided as a basis for building custom data loggers that do logging asynchronously in a dedicated background thread. Any calls to DataLogger interface methods from within OutputContext::emit or InputContext::receive just push the items to be logged onto a queue. Logging items from that queue happens asynchronously using the dedicated logging thread managed by the AsyncDataLoggerResource. This means that the compute thread is not blocked on logging completion. This can be beneficial over the existing DataLoggerResource when the logging duration is not negligible (e.g. writing to a file).

  • A new concrete data logger AsyncConsoleLogger is added as a concrete example of an AsyncDataLoggerResource. This logger logs to the console in the same style as GXFConsoleLogger, but the logging is done asynchronously by a background thread. It can be used in an application as follows.

    In C++:

    #include "holoscan/data_loggers/async_console_logger/async_console_logger.hpp"
    
    auto async_logger = app->make_resource<holoscan::data_loggers::AsyncConsoleLogger>(
        "console_logger",
        app->from_config("async_console_logger"));
    
    app->add_data_logger(async_logger);

    In Python:

    from holoscan.data_loggers import AsyncConsoleLogger
    
    app.add_data_logger(
        AsyncConsoleLogger(
            app, name="async_console_logger", log_tensor_data_content=False, log_metadata=True,
        )
    )

    See examples/video_replayer for a concrete example application using this logger type.

Examples
  • A new example, distributed_pose_tree, has been added in both C++ and Python. It demonstrates how to use the distributed PoseTree in a multi-fragment application where one fragment updates poses and another queries them, with the data being synchronized automatically.

Breaking Changes

  • Python 3.9 support has been dropped in this release. Please remain on Holoscan <= 3.4 for Python 3.9 support.

  • There is one breaking change to the (experimental) DataLogger interface introduced in Holoscan v3.4. The existing DataLogger::log_data method was updated to use const std::any& data instead of std::any data as the first argument. The corresponding change was also made in the derived DataLoggerResource and BasicConsoleLogger classes.

  • The BasicConsoleLogger no longer logs the GXF-specific entity type. Please use the new GXFConsoleLogger instead to have the equivalent functionality of the v3.4 BasicConsoleLogger in v3.5. The split of entity logging from BasicConsoleLogger to the new GXFConsoleLogger class was done to make use of the new DataLogger::log_backend_specific interface method for logging nvidia::gxf::Entity types. Having this logic in a method on the logger rather than in the core SDK allows it to potentially be extended in the future to log other component types in the entity aside from tensors.

  • Please see the Core section above about changes to default tuning of UCX environment variables for distributed applications (UCX_TCP_TX_SEG_SIZE, UCX_TCP_RX_SEG_SIZE, and HOLOSCAN_UCX_SERIALIZATION_BUFFER_SIZE). Applications should continue to operate as before, although possibly with some change in performance due to the new tuning of these parameters.

Known Issues

This section describes unresolved issues identified during development and QA for this release.

Issue Description
4339399 High CPU usage observed with video_replayer_distributed application. While the high CPU usage associated with the GXF UCX extension has been fixed since v1.0, distributed applications using the MultiThreadScheduler (with the check_recession_period_ms parameter set to 0 by default) may still experience high CPU usage. Setting the HOLOSCAN_CHECK_RECESSION_PERIOD_MS environment variable to a value greater than 0 (e.g. 1.5) can help reduce CPU usage. However, this may result in increased latency for the application until the MultiThreadScheduler switches to an event-based multithreaded scheduler.
4318442 UCX cuda_ipc protocol doesn't work in Docker containers on x86_64. As a workaround, we are currently disabling the UCX cuda_ipc protocol on all platforms via the UCX_TLS environment variable.
4384348 UCX termination (either ctrl+c , press 'Esc' or clicking close button) is not smooth and can show multiple error messages.
4481171 Running the driver for a distributed applications on IGX Orin devkits fails when connected to other systems through eth1. A workaround is to use eth0 port to connect to other systems for distributed workloads.
4458192 In scenarios where distributed applications have both the driver and workers running on the same host, either within a Docker container or directly on the host, there's a possibility of encountering "Address already in use" errors. A potential solution is to assign a different port number to the HOLOSCAN_HEALTH_CHECK_PORT environment variable (default: 8777), for example, by using export HOLOSCAN_HEALTH_CHECK_PORT=8780.
4768945 Distributed applications crash when the engine file is unavailable/generating engine file.
4753994 Debugging Python application may lead to segfault when expanding an operator variable.
Wayland: holoscan::viz::Init() with existing GLFW window fails.
4394306 When Python bindings are created for a C++ Operator, it is not always guaranteed that the destructor will be called prior to termination of the Python application. As a workaround to this issue, it is recommended that any resource cleanup should happen in an operator's stop() method rather than in the destructor.
4909073 V4L2 and AJA applications in x86 container report Wayland XDG_RUNTIME_DIR not set error
5211869 Error "Failed to start server on 0.0.0.0:10002" in VScode Debug Distributed Endoscopy Tool Tracking application
5180229 std::bad_alloc exception with Isaac Sim due to loading Holoscan Python module with RTDL_GLOBAL flag
5162855 Dual-GPU Configuration fails Holoscan application
5144233 python-api-tracing-profile failure on Ubuntu 24.04 / Python 3.12
5098866 Segmentation Fault in Python on second .run() call
5061275 Ping distributed multi-nodes failed to create path between two nodes
5014059 VScode Debug Distributed Endoscopy Tool Tracking application on an IGX w/dGPU, does not hit the expected debug points.
4953020 The HOLOINFER_TEST is failing, or a segmentation fault occurs during the parseFromFile() call.
4808248 FormatConverterOp: GXF VideoBuffer with format GXF_VIDEO_FORMAT_NV12 is processed in wrong colorspace
4789382 InferenceOp with libtorch backend reports undefined symbols
5388798 A default CUDA stream pool is not created as expected for operators not having a "cuda_stream_pool" parameter. This could result in receive_cuda_stream returning the default stream when a dedicated operator stream was expected.
5390206 The Distributed PoseTree service using UCX hangs when a fourth client tries to connect due to an issue in the UCX version (v1.17) in the base container. A workaround is to use a container with UCX v1.18 or newer, which is ABI compatible. This will be addressed in a future release.