Skip to content

Commit

Permalink
Merge branch 'main' into add-real-colon-polyp-detection
Browse files Browse the repository at this point in the history
  • Loading branch information
yiheng-wang-nv authored Feb 25, 2025
2 parents d8bf3f2 + 6e4e377 commit de5fcf9
Show file tree
Hide file tree
Showing 76 changed files with 2,644 additions and 663 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/gh-pages-docs-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: gh-pages-docs-deploy

on:
push:
branches: [main]
pull_request:
branches: [main]
merge_group:
types: [checks_requested]

jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: 3.x
- name: Cache dependencies
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('doc/website/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r doc/website/requirements.txt
- name: Build site
run: mkdocs build
working-directory: doc/website
- name: Configure Git Credentials
if: github.event_name == 'push'
run: |
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
- name: Deploy
if: github.event_name == 'push'
run: mkdocs gh-deploy --force
working-directory: doc/website
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(CMAKE_INSTALL_PREFIX "${CMAKE_SOURCE_DIR}/install" CACHE PATH "Installation directory" FORCE)
endif()

# Set default build type to Release if not specified
if(NOT CMAKE_BUILD_TYPE)
message(STATUS "Setting build type to 'Release' as none was specified.")
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Choose the type of build." FORCE)
endif()

# Enable Testing
include(CTest)

Expand Down
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@
![Metadata](https://img.shields.io/github/actions/workflow/status/nvidia-holoscan/holohub/check_metadata.yml?branch=main&label=Metadata
)

[![Applications](https://img.shields.io/badge/Applications-91-59A700)](https://github.com/nvidia-holoscan/holohub/tree/main/applications)
[![Operators](https://img.shields.io/badge/Operators-42-59A700)](https://github.com/nvidia-holoscan/holohub/tree/main/operators)
[![Tutorials](https://img.shields.io/badge/Tutorials-12-59A700)](https://github.com/nvidia-holoscan/holohub/tree/main/tutorials)
Visit [https://nvidia-holoscan.github.io/holohub](https://nvidia-holoscan.github.io/holohub) for a searchable catalog of all available components.

This is a central repository for the NVIDIA Holoscan AI sensor processing community to share reference applications, operators, tutorials and benchmarks. We invite users and developers of the Holoscan platform to reuse and contribute to this repository.

Expand Down
132 changes: 0 additions & 132 deletions applications/adv_networking_bench/Dockerfile

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
%YAML 1.2
# SPDX-FileCopyrightText: Copyright (c) 2022-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
---
multithreaded: true
num_delay_ops: 32
delay: 0.1
delay_step: 0.01

scheduler:
check_recession_period_ms: 0
worker_thread_number: 5
stop_on_deadlock: true
stop_on_deadlock_timeout: 500
# max_duration_ms: 20000

advanced_network:
cfg:
version: 1
manager: "dpdk"
master_core: 3
debug: false
log_level: "info"

memory_regions:
- name: "Data_RX_GPU"
kind: "device"
affinity: 0
access:
- local
num_bufs: 51200
buf_size: 9000
- name: "Data_RX_GPU2"
kind: "device"
affinity: 0
access:
- local
num_bufs: 51200
buf_size: 9000

interfaces:
- name: data2
address: <0000:00:00.0> # The BUS address of the interface doing Rx
flow_isolation: true
rx:
- queues:
- name: "Data"
id: 0
cpu_core: 9
batch_size: 10240
output_port: "bench_rx_out"
memory_regions:
- "Data_RX_GPU"
- name: "Data"
id: 1
cpu_core: 9
batch_size: 10240
output_port: "bench_rx_out"
memory_regions:
- "Data_RX_GPU2"
flows:
- name: "ADC Samples"
id: 0
action:
type: queue
id: 0
match:
udp_src: 4096 #12288
udp_dst: 4096 #12288
- name: "ADC Samples"
id: 1
action:
type: queue
id: 1
match:
udp_src: 4095 #12288
udp_dst: 4095 #12288

bench_rx:
gpu_direct: true # Set to true if using a GPU region for the Rx queues.
split_boundary: false # Whether header and data is split (Header to CPU)
batch_size: 10240
max_packet_size: 1064
header_size: 64
41 changes: 32 additions & 9 deletions applications/adv_networking_bench/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,12 @@ add_custom_target(adv_networking_bench_default_tx_rx_yaml
)
add_dependencies(adv_networking_bench adv_networking_bench_default_tx_rx_yaml)

add_custom_target(adv_networking_bench_default_rx_multi_q_yaml
COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/../adv_networking_bench_default_rx_multi_q.yaml" ${CMAKE_CURRENT_BINARY_DIR}
DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/../adv_networking_bench_default_rx_multi_q.yaml"
)
add_dependencies(adv_networking_bench adv_networking_bench_default_rx_multi_q_yaml)

add_custom_target(adv_networking_bench_default_tx_yaml
COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/../adv_networking_bench_default_tx.yaml" ${CMAKE_CURRENT_BINARY_DIR}
DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/../adv_networking_bench_default_tx.yaml"
Expand Down Expand Up @@ -98,18 +104,16 @@ install(
FILES ../adv_networking_bench_default_rx.yaml
../adv_networking_bench_default_tx.yaml
../adv_networking_bench_default_tx_rx.yaml
../adv_networking_bench_default_rx_multi_q.yaml
../adv_networking_bench_doca_tx_rx.yaml
../adv_networking_bench_rmax_rx.yaml
DESTINATION bin/adv_networking_bench/cpp
COMPONENT holoscan-networking
)


# Add testing
if(BUILD_TESTING)
## adv_networking_bench_dpdk_multi_if_loopback_test ##
# The test below is expected to run on a system with a ConnectX NIC with
# both ports connected in a loopback, with optimal system setups (BAR1,
# GPU clock, CPU clock, huge pages, etc... docs incoming).

# Define a macro to handle the execution and checks
macro(execute_and_check MSG CMD OUTPUT_VAR)
Expand All @@ -121,7 +125,7 @@ if(BUILD_TESTING)
if(NOT result_code EQUAL 0 OR "${${OUTPUT_VAR}}" STREQUAL "")
message(STATUS "[ANO Test] ${MSG}")
message(WARNING "'${CMD}' failed (${result_code}) or output was empty.\nError: ${error_output}")
message(STATUS "[ANO Test] Skipping advanced networking loopback test")
message(STATUS "[ANO Test] Skipping advanced networking test")
return()
else()
message(STATUS "[ANO Test] ${MSG} ${${OUTPUT_VAR}}")
Expand All @@ -139,12 +143,12 @@ if(BUILD_TESTING)
message(WARNING "[ANO Test] Skipping advanced networking test")
return()
endif()

# TEST 1 TX/RX loopback over single link. One TX queue and one RX queue
list(GET cx_bus_address_list 0 tx_bus)
list(GET cx_bus_address_list 1 rx_bus)
execute_and_check("ETH Interface for ${tx_bus}:" "find /sys/class/net -exec bash -c 'echo {} $(readlink -f {}/device)' \; | grep ${tx_bus} | awk '{print $1}'" tx_if)
execute_and_check("MAC Address for ${tx_if}:" "cat ${tx_if}/address" rx_eth_mac)

# Inject in the test config and add app timeout
file(READ "${CMAKE_CURRENT_SOURCE_DIR}/../adv_networking_bench_default_tx_rx.yaml" TEST_CONFIG)
string(REGEX REPLACE "# max_duration_ms:[^\n]*" "max_duration_ms: 20000" TEST_CONFIG ${TEST_CONFIG})
string(REGEX REPLACE "address: [^\n]*interface[^\n]*Rx[^\n]*" "address: ${rx_bus}" TEST_CONFIG ${TEST_CONFIG})
Expand All @@ -153,9 +157,28 @@ if(BUILD_TESTING)
string(REGEX REPLACE "eth_dst_addr:[^\n]*" "eth_dst_addr: ${rx_eth_mac}" TEST_CONFIG ${TEST_CONFIG})
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/adv_networking_bench_dpdk_multi_if_loopback_test.yaml" ${TEST_CONFIG})

# Define the test
# TEST 2 RX multi queue with a single CPU core. Uses a scapy script to send packets
file(READ "${CMAKE_CURRENT_SOURCE_DIR}/../adv_networking_bench_default_rx_multi_q.yaml" TEST_CONFIG)
string(REGEX REPLACE "# max_duration_ms:[^\n]*" "max_duration_ms: 20000" TEST_CONFIG ${TEST_CONFIG})
string(REGEX REPLACE "address: [^\n]*interface[^\n]*Rx[^\n]*" "address: ${rx_bus}" TEST_CONFIG ${TEST_CONFIG})
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/adv_networking_bench_dpdk_rx_multi_q.yaml" ${TEST_CONFIG})


# Define the tests
file(COPY "testing/adv_networking_test_harness.py" DESTINATION "testing")
add_test(NAME adv_networking_bench_dpdk_multi_if_loopback_test
COMMAND python3 testing/adv_networking_test_harness.py "./adv_networking_bench adv_networking_bench_dpdk_multi_if_loopback_test.yaml" --avg-throughput-threshold 90 --missed-packets-threshold 0.1
COMMAND python3 testing/adv_networking_test_harness.py "./adv_networking_bench adv_networking_bench_dpdk_multi_if_loopback_test.yaml"
--avg-throughput-threshold 90
--missed-packets-threshold 0.1
--port-map 0-1
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})

add_test(NAME adv_networking_bench_dpdk_multi_rx_q_test
COMMAND python3 testing/adv_networking_test_harness.py "./adv_networking_bench adv_networking_bench_dpdk_rx_multi_q.yaml"
--avg-throughput-threshold 0
--missed-packets-threshold 0
--packets-per-rx-queue 1 1
--port-map 0-0
--external-script ${CMAKE_CURRENT_SOURCE_DIR}/../utils/test_multi_rx_q.py
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
endif()
1 change: 1 addition & 0 deletions applications/adv_networking_bench/cpp/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
},
"platforms": ["amd64", "arm64"],
"tags": ["Network", "Networking", "DPDK", "UDP", "Ethernet", "IP", "GPUDirect", "RDMA"],
"dockerfile": "operators/advanced_network/Dockerfile",
"holoscan_sdk": {
"minimum_required_version": "0.6.0",
"tested_versions": [
Expand Down
Loading

0 comments on commit de5fcf9

Please sign in to comment.