Skip to content

Commit e55e18f

Browse files
committed
Update README and CMake scripts
- Add VPI library introduction to README - Add information about allowlist to README - Refer to CUPVA with full name in README - Update minimum Holoscan version to 2.1.0 - Update CMake scripts to download precompiled libraries in build time Signed-off-by: Mehmet Umut Demircin <mdemircin@nvidia.com>
1 parent 17b7977 commit e55e18f

File tree

2 files changed

+17
-9
lines changed

2 files changed

+17
-9
lines changed

applications/precompiled_pva/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ This example application processes a video stream, displaying two visualizer win
99

1010
## About PVA
1111

12-
PVA is a highly power-efficient VLIW processor integrated into NVIDIA Tegra platforms, specifically designed for advanced image processing and computer vision algorithms. The CUPVA SDK offers a comprehensive and unified programming model for PVA, enabling developers to create and optimize their own algorithms. For access to the SDK and further development opportunities, please contact NVIDIA.
12+
PVA is a highly power-efficient VLIW processor integrated into NVIDIA Tegra platforms, specifically designed for advanced image processing and computer vision algorithms. The Compute Unified Programmable Vision Accelerator (CUPVA) SDK offers a comprehensive and unified programming model for PVA, enabling developers to create and optimize their own algorithms. For access to the SDK and further development opportunities, please contact NVIDIA.
1313

1414
## Content
1515

1616
- `main.cpp`: This file contains a C++ Holoscan application that demonstrates the use of an operator for loading and executing a precompiled PVA library dedicated to performing the unsharp masking algorithm on images. CUPVA SDK and license are not required to run this Holohub application.
17-
- `pva_unsharp_mask/`: This directory houses the `pva_unsharp_mask.hpp` header file, which declares the `PvaUnsharpMask` class. The `PvaUnsharpMask` class includes an `init` API, invoked for the initial tensor, and a `process` API, used for processing input tensors. Precompiled algorithm library file, `libpva_unsharp_mask.a`, and the corresponding allow list file, `cupva_allowlist_pva_unsharp_mask`, are automatically downloaded by the CMake scripts.
18-
17+
- `pva_unsharp_mask/`: This directory houses the `pva_unsharp_mask.hpp` header file, which declares the `PvaUnsharpMask` class. The `PvaUnsharpMask` class includes an `init` API, invoked for the initial tensor, and a `process` API, used for processing input tensors. Precompiled algorithm library file, `libpva_unsharp_mask.a`, and the corresponding allowlist file, `cupva_allowlist_pva_unsharp_mask`, are automatically downloaded by the CMake scripts.
18+
Please note that only PVA executables with signatures included in a secure allowlist database are permitted to execute on the PVA. This ensures that only verified and trusted executables are run, enhancing the security and integrity of the system.
1919

2020
## Algorithm Overview
2121

@@ -25,7 +25,7 @@ The PreCompiledPVAExecutor operator performs an image sharpening operation in th
2525
2. Apply a 5x5 unsharp mask filter on the luminance color plane.
2626
3. Convert the enhanced image back to the RGB format.
2727

28-
The [VPI library](https://developer.nvidia.com/embedded/vpi) offers numerous algorithm examples that leverage the PVA as the backend.
28+
Numerous algorithm examples leveraging the PVA can be found in the [Vision Programming Interface (VPI) library](https://developer.nvidia.com/embedded/vpi). VPI enables computer vision software developers to utilize multiple compute engines simultaneously&mdash;including CPU, GPU, PVA, VIC, NVENC, and OFA&mdash;through a unified interface. For comprehensive details, please refer to the [VPI Documentation](https://docs.nvidia.com/vpi/index.html).
2929

3030
## Compiling the application
3131

@@ -52,7 +52,7 @@ $ ./run build precompiled_pva
5252
The application takes an endoscopy video stream as input, applies the unsharp mask filter, and shows it in
5353
HoloViz window.
5454

55-
Before running the application, deploy VPU application signature allow-list on target in your host (outside a container):
55+
Before running the application, deploy VPU application signature allowlist on target in your host (outside a container):
5656
```bash
5757
sudo cp <HOLOHUB_BUILD_DIR>/applications/precompiled_pva/cpp/pva_unsharp_mask/cupva_allowlist_pva_unsharp_mask /etc/pva/allow.d/cupva_allowlist_pva_unsharp_mask
5858
sudo pva_allow

applications/precompiled_pva/cpp/CMakeLists.txt

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# license agreement from NVIDIA Corporation is strictly prohibited.
99
#
1010

11-
find_package(holoscan 1.0.3 REQUIRED CONFIG
11+
find_package(holoscan 2.1.0 REQUIRED CONFIG
1212
PATHS "/opt/nvidia/holoscan" "/workspace/holoscan-sdk/install")
1313

1414
add_executable(precompiled_pva
@@ -35,16 +35,24 @@ set(PVA_UNSHARP_MASK_URL "https://edge.urm.nvidia.com/artifactory/sw-holoscan-th
3535
# Define the URL for downloading cupva_allowlist_pva_unsharp_mask
3636
set(CUPVA_ALLOWLIST_URL "https://edge.urm.nvidia.com/artifactory/sw-holoscan-thirdparty-generic-local/pva/cupva_allowlist_pva_unsharp_mask")
3737

38-
# Define a custom target for preparing libpva_unsharp_mask.a and cupva_allowlist_pva_unsharp_mask
39-
add_custom_target(prepare_pva_dependencies
38+
# Define a custom command for preparing libpva_unsharp_mask.a and cupva_allowlist_pva_unsharp_mask
39+
add_custom_command(
40+
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/pva_unsharp_mask/prepared.stamp"
4041
COMMAND ${CMAKE_COMMAND} -E cmake_echo_color --cyan "Preparing PVA dependencies..."
4142
COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_CURRENT_BINARY_DIR}/pva_unsharp_mask"
4243
COMMAND ${CMAKE_COMMAND} -E cmake_echo_color --green "Directory ensured at ${CMAKE_CURRENT_BINARY_DIR}/pva_unsharp_mask"
4344
COMMAND ${CMAKE_COMMAND} -D PVA_UNSHARP_MASK_LIB_DEST="${PVA_UNSHARP_MASK_LIB_DEST}" -D PVA_UNSHARP_MASK_URL="${PVA_UNSHARP_MASK_URL}" -D CUPVA_ALLOWLIST_URL="${CUPVA_ALLOWLIST_URL}" -D CUPVA_ALLOWLIST_DEST="${CUPVA_ALLOWLIST_DEST}" -P "${CMAKE_CURRENT_LIST_DIR}/PreparePVADependencies.cmake"
45+
COMMAND ${CMAKE_COMMAND} -E touch "${CMAKE_CURRENT_BINARY_DIR}/pva_unsharp_mask/prepared.stamp"
4446
COMMENT "Preparing libpva_unsharp_mask.a and cupva_allowlist_pva_unsharp_mask"
4547
)
4648

47-
add_dependencies(pva_unsharp_mask prepare_pva_dependencies)
49+
# Define a custom target that depends on the custom command
50+
add_custom_target(prepare_pva_dependencies ALL
51+
DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/pva_unsharp_mask/prepared.stamp"
52+
)
53+
54+
# Ensure the custom target is built before the main target
55+
add_dependencies(precompiled_pva prepare_pva_dependencies)
4856

4957
# Update the IMPORTED_LOCATION to the new path in the build directory
5058
set_target_properties(pva_unsharp_mask PROPERTIES IMPORTED_LOCATION ${PVA_UNSHARP_MASK_LIB_DEST})

0 commit comments

Comments
 (0)