Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade nvImageCodec to 0.4.1 version #5576

Merged
merged 38 commits into from
Jan 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
94f51d9
Attempt fix
jantonguirao Jul 23, 2024
ce09587
Improve performance of ImageDecoder
jantonguirao Jul 24, 2024
a90ef4b
Document DALI_EVENT_POOL_INITIAL_SIZE
jantonguirao Jul 31, 2024
ab16d91
Fixes
jantonguirao Jul 31, 2024
e01a5bf
Refactoring
jantonguirao Aug 1, 2024
2afd164
Update
jantonguirao Sep 6, 2024
e790b86
Changes in header
jantonguirao Sep 16, 2024
9b7f0eb
Update nvimgcodec header
jantonguirao Oct 17, 2024
78ab6af
Use skip_pre_sync
jantonguirao Oct 22, 2024
5ed818f
Install nvtiff in tests
jantonguirao Oct 31, 2024
743dadb
Bump nvImageCodec tag
jantonguirao Nov 13, 2024
a6c0154
Use release of nvimagecodec
jantonguirao Nov 13, 2024
1a863bc
Bump to nvimmagecodec 0.4.0
jantonguirao Nov 13, 2024
b78d4e6
Bump nvimagecodec version in conda
jantonguirao Nov 14, 2024
8a31d02
Use dynamic linking for tegra as well
jantonguirao Nov 19, 2024
a9197a1
Fixes
jantonguirao Nov 20, 2024
d01d513
Require nvImageCodec 0.4.1
jantonguirao Nov 20, 2024
e49556a
Temporary change
jantonguirao Nov 21, 2024
9108ccf
Remove CUDA event pool prepopulation
jantonguirao Nov 22, 2024
c327be0
Fixes
jantonguirao Nov 25, 2024
4ae0382
Use hw_decoder_load=0 in dali_variable_batch_size for determinism
jantonguirao Nov 25, 2024
6f6311f
Fix
jantonguirao Nov 26, 2024
033f4f6
Remove old doc
jantonguirao Nov 26, 2024
dd6185f
Use default hw_decoder_load again
jantonguirao Nov 27, 2024
506399a
Do not use hw decoder for variable batch size tests
jantonguirao Nov 28, 2024
07e27e5
Make non-contiguous alloc
jantonguirao Dec 2, 2024
5d5cca7
Fixes
jantonguirao Dec 2, 2024
bf41d39
Fixes
jantonguirao Dec 2, 2024
5ebfab4
Limit number of setup blocks
jantonguirao Dec 2, 2024
e65f445
Fixes
jantonguirao Dec 3, 2024
bf74581
Fixes
jantonguirao Dec 3, 2024
8e0e80e
cooperative setup
jantonguirao Dec 3, 2024
1925758
Add --experimental_decoder option
jantonguirao Dec 4, 2024
e479091
static analysis fix
jantonguirao Dec 9, 2024
d10d283
Override hw_decoder_load for nvimagecodec 0.4.x versions (workaround …
jantonguirao Dec 10, 2024
e3067a4
Bump minimum version
jantonguirao Dec 30, 2024
d45db51
Fix test.sh
jantonguirao Dec 30, 2024
755b492
Use nvimagecodec 0.4.1.21 tarball
jantonguirao Jan 8, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 37 additions & 6 deletions cmake/Dependencies.common.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -273,9 +273,18 @@ endif()
# nvimagecodec
##################################################################
set(DALI_INSTALL_REQUIRES_NVIMGCODEC "")
set(DALI_INSTALL_REQUIRES_NVJPEG2K "")
set(DALI_INSTALL_REQUIRES_NVTIFF "")
if(BUILD_NVIMAGECODEC)
set(NVIMGCODEC_MIN_VERSION "0.3.0")
set(NVIMGCODEC_MAX_VERSION "0.4.0")
set(NVJPEG2K_MIN_VERSION "0.8.0")
set(NVJPEG2K_MAX_VERSION "0.9.0")

set(NVTIFF_MIN_VERSION "0.4.0")
set(NVTIFF_MAX_VERSION "0.5.0")

set(NVIMGCODEC_MIN_VERSION "0.4.1")
set(NVIMGCODEC_MAX_VERSION "0.5.0")
message(STATUS "nvImageCodec - requires version >=${NVIMGCODEC_MIN_VERSION}, <${NVIMGCODEC_MAX_VERSION}")
if (WITH_DYNAMIC_NVIMGCODEC)
message(STATUS "nvImageCodec - dynamic load")

Expand All @@ -288,8 +297,8 @@ if(BUILD_NVIMAGECODEC)
include(FetchContent)
FetchContent_Declare(
nvimgcodec_headers
URL https://developer.download.nvidia.com/compute/nvimgcodec/redist/nvimgcodec/linux-x86_64/nvimgcodec-linux-x86_64-0.3.0.5-archive.tar.xz
URL_HASH SHA512=259bff93305c301fb4325c6e2f71da93f3f6e0b38c7c8739913ca70b5a9c74cc898a608c5ac6e830dba1739878e53607ded03deaf2f23af3a9cc473463f100eb
URL https://developer.download.nvidia.com/compute/nvimgcodec/redist/nvimgcodec/linux-x86_64/nvimgcodec-linux-x86_64-0.4.1.21-archive.tar.xz
URL_HASH SHA512=3f20f6944a360597586bfe3550a0605257bcd944748477a869691ec1a42716e3722f8ddbd0b525995ebab89a33cd91ed82d5b151194008f1a8424971448a4824
)
FetchContent_Populate(nvimgcodec_headers)
set(nvimgcodec_SEARCH_PATH "${nvimgcodec_headers_SOURCE_DIR}/${CUDA_VERSION_MAJOR}/include")
Expand All @@ -304,7 +313,27 @@ if(BUILD_NVIMAGECODEC)
message(STATUS "NVIMGCODEC_DEFAULT_INSTALL_PATH=${NVIMGCODEC_DEFAULT_INSTALL_PATH}")
add_definitions(-DNVIMGCODEC_DEFAULT_INSTALL_PATH=\"${NVIMGCODEC_DEFAULT_INSTALL_PATH}\")

set(DALI_INSTALL_REQUIRES_NVIMGCODEC "\'nvidia-nvimgcodec-cu${CUDA_VERSION_MAJOR} >= ${NVIMGCODEC_MIN_VERSION}, < ${NVIMGCODEC_MAX_VERSION}',")
# Find the position of the substring
string(FIND "aarch64-linux-gnu" "${CMAKE_PREFIX_PATH}" SUBSTRING_POSITION)
if(NOT SUBSTRING_POSITION EQUAL -1)
# Substring found
set(NVIMGCODEC_PACKAGE_NAME "nvidia-nvimgcodec-cu${CUDA_VERSION_MAJOR}")
set(NVJPEG2K_PACKAGE_NAME "nvidia-nvjpeg2k-cu${CUDA_VERSION_MAJOR}")
set(NVTIFF_PACKAGE_NAME "nvidia-nvtiff-cu${CUDA_VERSION_MAJOR}")
else()
# Substring not found
set(NVIMGCODEC_PACKAGE_NAME "nvidia-nvimgcodec-tegra-cu${CUDA_VERSION_MAJOR}")
set(NVJPEG2K_PACKAGE_NAME "nvidia-nvjpeg2k-tegra-cu${CUDA_VERSION_MAJOR}")
set(NVTIFF_PACKAGE_NAME "nvidia-nvtiff-tegra-cu${CUDA_VERSION_MAJOR}")
endif()

# TODO(janton): Replace with nvimgcodec[nvtiff+nvjpeg2k+...] when available
set(DALI_INSTALL_REQUIRES_NVJPEG2K "\'${NVJPEG2K_PACKAGE_NAME} >= ${NVJPEG2K_MIN_VERSION}, < ${NVJPEG2K_MAX_VERSION}',")
message(STATUS "Adding nvjpeg2k requirement as: ${DALI_INSTALL_REQUIRES_NVJPEG2K}")
set(DALI_INSTALL_REQUIRES_NVTIFF "\'${NVTIFF_PACKAGE_NAME} >= ${NVTIFF_MIN_VERSION}, < ${NVTIFF_MAX_VERSION}',")
message(STATUS "Adding nvtiff requirement as: ${DALI_INSTALL_REQUIRES_NVTIFF}")
set(DALI_INSTALL_REQUIRES_NVIMGCODEC "\'${NVIMGCODEC_PACKAGE_NAME} >= ${NVIMGCODEC_MIN_VERSION}, < ${NVIMGCODEC_MAX_VERSION}',")
message(STATUS "Adding nvimagecodec requirement as: ${DALI_INSTALL_REQUIRES_NVIMGCODEC}")
else()
message(STATUS "nvImageCodec - static link")

Expand All @@ -321,7 +350,7 @@ if(BUILD_NVIMAGECODEC)
ExternalProject_Add(
nvImageCodec
GIT_REPOSITORY https://github.com/NVIDIA/nvImageCodec.git
GIT_TAG v0.3.0
GIT_TAG v0.4.0
GIT_SUBMODULES "external/pybind11"
"external/NVTX"
"external/googletest"
Expand All @@ -336,6 +365,8 @@ if(BUILD_NVIMAGECODEC)
"-DWITH_DYNAMIC_NVJPEG2K=OFF"
"-DBUILD_NVJPEG_EXT=${BUILD_NVJPEG}"
"-DWITH_DYNAMIC_NVJPEG=${WITH_DYNAMIC_NVJPEG}"
"-DBUILD_NVTIFF_EXT=OFF"
"-DWITH_DYNAMIC_NVTIFF=OFF"
"-DBUILD_NVBMP_EXT=OFF"
"-DBUILD_NVPNM_EXT=OFF"
"-DBUILD_LIBJPEG_TURBO_EXT=${BUILD_LIBJPEG_TURBO}"
Expand Down
4 changes: 2 additions & 2 deletions conda/third_party/dali_nvimagecodec/recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@
# limitations under the License.


{% set build_version = "0.3.0" %}
{% set build_version = "0.4.0" %}

package:
name: nvidia-nvimagecodec-cuda{{ environ.get('CUDA_VERSION', '') | replace(".","") }}
version: {{ build_version }}

source:
git_url: https://github.com/NVIDIA/nvImageCodec.git
git_rev: v0.3.0
git_rev: v0.4.0

build:
number: 0
Expand Down
Loading
Loading