NVIDIA / nvImageCodec

A nvImageCodec library of GPU- and CPU- accelerated codecs featuring a unified interface
https://docs.nvidia.com/cuda/nvimagecodec/index.html
Apache License 2.0
81 stars 5 forks source link

Could not create decoder. #17

Closed feitreim closed 3 months ago

feitreim commented 3 months ago

Version

0.3.0

Describe the bug.

Issue started with DALI, but after testing I realized my minimal reproduction is just nvimgcodec. Just trying to decode jpeg images. Every time I just get the message [ERROR] [nvimgcodec] Could not create decoder

Minimum reproducible example

from nvidia import nvimgcodec paths = ['./img1.jpg', './img2.jpg'] dec = nvimgcodec.Decoder() dec.read(paths)

Environment details

Click here to see environment details

     **git***
     commit 1c3677685d2fc568be12845720e30091bae3634e (HEAD -> main, tag: v0.3.0, origin/main, origin/HEAD)
     Merge: e61f259 4c278b7
     Author: Joaquin Anton 
     Date:   Fri Aug 9 00:58:48 2024 -0700

     Merge branch 'release_v0.3.0' into 'main'

     sync with internal nvimagecodec repo release_v0.3.0 branch (commit c80dfc7)

     See merge request cuda-hpc-libraries/nvimagecodec-public!2
     **git submodules***
     -09e0d23a61ae86cc381eef85d012afc3a2e6eeea ../external/NVTX
     -667e87b3392db338a919cbe0213979713aca52e3 ../external/boost/preprocessor
     -2a7e9f1256ddc48186c86dff7a00e189b47e5310 ../external/dlpack
     -456574145cf71a5375777cab58453acfd92a920b ../external/googletest
     -b6ee1016abbc55116304ad396cf88aa19391e10a ../external/libjpeg-turbo
     -1d28fe638020f55644319599ece84b3fb0b39bb5 ../external/libtiff
     -ea94f7eba9aea221956a66d94771a187a56bfcdf ../external/opencv
     -0e3b3bd716f2b5178d981b17de9505f94ddfff58 ../external/openjpeg
     -768cebe17e65c2a0a64ed067510729efc3c7ff6c ../external/pybind11
     -f1f503da85d52e56aae11557b4d79a42bcaa2b86 ../external/zlib
     -81bfe3655eb6a03e013a95aa533780b018b8fa6d ../external/zstd

     ***OS Information***
     Rocky Linux release 8.10 (Green Obsidian)
     NAME="Rocky Linux"
     VERSION="8.10 (Green Obsidian)"
     ID="rocky"
     ID_LIKE="rhel centos fedora"
     VERSION_ID="8.10"
     PLATFORM_ID="platform:el8"
     PRETTY_NAME="Rocky Linux 8.10 (Green Obsidian)"
     ANSI_COLOR="0;32"
     LOGO="fedora-logo-icon"
     CPE_NAME="cpe:/o:rocky:rocky:8:GA"
     HOME_URL="https://rockylinux.org/"
     BUG_REPORT_URL="https://bugs.rockylinux.org/"
     SUPPORT_END="2029-05-31"
     ROCKY_SUPPORT_PRODUCT="Rocky-Linux-8"
     ROCKY_SUPPORT_PRODUCT_VERSION="8.10"
     REDHAT_SUPPORT_PRODUCT="Rocky Linux"
     REDHAT_SUPPORT_PRODUCT_VERSION="8.10"
     Rocky Linux release 8.10 (Green Obsidian)
     Rocky Linux release 8.10 (Green Obsidian)
     Rocky Linux release 8.10 (Green Obsidian)
     Linux g-3-0 4.18.0-553.16.1.el8_10.x86_64 #1 SMP Thu Aug 8 17:47:08 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

     ***GPU Information***
     Mon Aug 26 11:18:02 2024
     +-----------------------------------------------------------------------------------------+
     | NVIDIA-SMI 555.42.06              Driver Version: 555.42.06      CUDA Version: 12.5     |
     |-----------------------------------------+------------------------+----------------------+
     | GPU  Name                 Persistence-M | Bus-Id          Disp.A | Volatile Uncorr. ECC |
     | Fan  Temp   Perf          Pwr:Usage/Cap |           Memory-Usage | GPU-Util  Compute M. |
     |                                         |                        |               MIG M. |
     |=========================================+========================+======================|
     |   0  NVIDIA H100 PCIe               Off |   00000000:17:00.0 Off |                    0 |
     | N/A   30C    P0             48W /  350W |       4MiB /  81559MiB |      0%      Default |
     |                                         |                        |             Disabled |
     +-----------------------------------------+------------------------+----------------------+
     |   1  NVIDIA H100 PCIe               Off |   00000000:3D:00.0 Off |                    0 |
     | N/A   29C    P0             48W /  350W |       4MiB /  81559MiB |      0%      Default |
     |                                         |                        |             Disabled |
     +-----------------------------------------+------------------------+----------------------+
     |   2  NVIDIA H100 PCIe               Off |   00000000:BD:00.0 Off |                    0 |
     | N/A   32C    P0             46W /  350W |       4MiB /  81559MiB |      0%      Default |
     |                                         |                        |             Disabled |
     +-----------------------------------------+------------------------+----------------------+

     +-----------------------------------------------------------------------------------------+
     | Processes:                                                                              |
     |  GPU   GI   CI        PID   Type   Process name                              GPU Memory |
     |        ID   ID                                                               Usage      |
     |=========================================================================================|
     |  No running processes found                                                             |
     +-----------------------------------------------------------------------------------------+

     ***CPU***
     Architecture:        x86_64
     CPU op-mode(s):      32-bit, 64-bit
     Byte Order:          Little Endian
     CPU(s):              32
     On-line CPU(s) list: 0-31
     Thread(s) per core:  2
     Core(s) per socket:  8
     Socket(s):           2
     NUMA node(s):        2
     Vendor ID:           GenuineIntel
     CPU family:          6
     Model:               143
     Model name:          Intel(R) Xeon(R) Gold 6434
     Stepping:            8
     CPU MHz:             3700.000
     CPU max MHz:         4100.0000
     CPU min MHz:         800.0000
     BogoMIPS:            7400.00
     Virtualization:      VT-x
     L1d cache:           48K
     L1i cache:           32K
     L2 cache:            2048K
     L3 cache:            23040K
     NUMA node0 CPU(s):   0-7,16-23
     NUMA node1 CPU(s):   8-15,24-31
     Flags:               fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 cat_l2 cdp_l3 invpcid_single intel_ppin cdp_l2 ssbd mba ibrs ibpb stibp ibrs_enhanced tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb intel_pt avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local split_lock_detect avx_vnni avx512_bf16 wbnoinvd dtherm ida arat pln pts hwp hwp_act_window hwp_epp hwp_pkg_req avx512vbmi umip pku ospke waitpkg avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg tme avx512_vpopcntdq la57 rdpid bus_lock_detect cldemote movdiri movdir64b enqcmd fsrm md_clear serialize tsxldtrk pconfig arch_lbr amx_bf16 avx512_fp16 amx_tile amx_int8 flush_l1d arch_capabilities

     ***CMake***
     /usr/bin/cmake
     cmake version 3.26.5

     CMake suite maintained and supported by Kitware (kitware.com/cmake).

     ***g++***
     /usr/bin/g++
     g++ (GCC) 8.5.0 20210514 (Red Hat 8.5.0-22)
     Copyright (C) 2018 Free Software Foundation, Inc.
     This is free software; see the source for copying conditions.  There is NO
     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

     ***nvcc***
/usr/bin/which: no nvcc in (/scratch_ssd/condor/execute/dir_2367/.cargo/bin:/usr/share/Modules/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/bin:/usr/bin:/opt/puppetlabs/bin)

     ***Python***
/usr/bin/which: no python in (/scratch_ssd/condor/execute/dir_2367/.cargo/bin:/usr/share/Modules/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/bin:/usr/bin:/opt/puppetlabs/bin)

     ***Environment Variables***
     PATH                            : /scratch_ssd/condor/execute/dir_2367/.cargo/bin:/usr/share/Modules/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/bin:/usr/bin:/opt/puppetlabs/bin
     LD_LIBRARY_PATH                 :
     NUMBAPRO_NVVM                   :
     NUMBAPRO_LIBDEVICE              :
     CONDA_PREFIX                    :
     PYTHON_PATH                     :

     conda not found
     pip not found

Relevant log output

[INFO] [nvimgcodec] Registering extension nvimgcodec_builtin_parsers version:0.3.0 [INFO] [nvimgcodec] Framework is registering parser (id:bmp_parser codec:bmp) [INFO] [nvimgcodec] Codec bmp not yet registered, registering for first time [INFO] [nvimgcodec] Framework is registering parser (id:jpeg_parser codec:jpeg) [INFO] [nvimgcodec] Codec jpeg not yet registered, registering for first time [INFO] [nvimgcodec] Framework is registering parser (id:jpeg2k_parser codec:jpeg2k) [INFO] [nvimgcodec] Codec jpeg2k not yet registered, registering for first time [INFO] [nvimgcodec] Framework is registering parser (id:png_parser codec:png) [INFO] [nvimgcodec] Codec png not yet registered, registering for first time [INFO] [nvimgcodec] Framework is registering parser (id:pnm_parser codec:pnm) [INFO] [nvimgcodec] Codec pnm not yet registered, registering for first time [INFO] [nvimgcodec] Framework is registering parser (id:tiff_parser codec:tiff) [INFO] [nvimgcodec] Codec tiff not yet registered, registering for first time [INFO] [nvimgcodec] Framework is registering parser (id:webp_parser codec:webp) [INFO] [nvimgcodec] Codec webp not yet registered, registering for first time [ERROR] [nvimgcodec] Could not create decoder [WARNING] [pynvimgcodec] Something went wrong during decoding image #0 it will not be included in output [WARNING] [pynvimgcodec] Something went wrong during decoding image #1 it will not be included in output [INFO] [nvimgcodec] Unregistering extension nvimgcodec_builtin_parsers version:0.3.0 [INFO] [nvimgcodec] Framework is unregistering parser (id:bmp_parser codec:bmp) [INFO] [nvimgcodec] Framework is unregistering parser (id:jpeg_parser codec:jpeg) [INFO] [nvimgcodec] Framework is unregistering parser (id:jpeg2k_parser codec:jpeg2k) [INFO] [nvimgcodec] Framework is unregistering parser (id:png_parser codec:png) [INFO] [nvimgcodec] Framework is unregistering parser (id:pnm_parser codec:pnm) [INFO] [nvimgcodec] Framework is unregistering parser (id:tiff_parser codec:tiff) [INFO] [nvimgcodec] Framework is unregistering parser (id:webp_parser codec:webp)

Other/Misc.

Reproduced this across both H100 and 2080ti, which is what I have access to. print_env.sh doesnt gather my python packages for some reason but I was to repro with uv run --isolated --with nvidia-nvimgcodec-cu12 minimal.py

Check for duplicates

feitreim commented 3 months ago

This also happens with CPU_ONLY backend, as well as example images from this repo.

feitreim commented 3 months ago

Actually this appears to be an issue with using symlink as the link-mode with UV. fixed.

jantonguirao commented 3 months ago

Actually this appears to be an issue with using symlink as the link-mode with UV. fixed.

I am happy to see you were able to resolve the issue. Thanks for letting us know.