Skip to content

Commit

Permalink
#3504 nvjpeg decoder no longer leaks memory with latest drivers
Browse files Browse the repository at this point in the history
  • Loading branch information
totaam committed Nov 25, 2022
1 parent f674dce commit 3fa5760
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ def has_header_file(name, isdir=False):
csc_swscale_ENABLED = DEFAULT and BITS==64 and pkg_config_ok("--exists", "libswscale")
csc_cython_ENABLED = DEFAULT
nvjpeg_encoder_ENABLED = DEFAULT and not OSX and BITS==64 and pkg_config_ok("--exists", "nvjpeg")
nvjpeg_decoder_ENABLED = False
nvjpeg_decoder_ENABLED = nvjpeg_encoder_ENABLED
nvenc_ENABLED = DEFAULT and not OSX and BITS==64 and pkg_config_version("10", "nvenc")
nvfbc_ENABLED = DEFAULT and not OSX and not ARM and BITS==64 and pkg_config_ok("--exists", "nvfbc")
cuda_kernels_ENABLED = DEFAULT and not OSX
Expand Down
6 changes: 5 additions & 1 deletion xpra/codecs/nvjpeg/decoder.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -255,9 +255,13 @@ def get_default_device():


def selftest(full=False):
from xpra.codecs.nv_util import has_nvidia_hardware
from xpra.codecs.nvidia.nv_util import has_nvidia_hardware, get_nvidia_module_version
if not has_nvidia_hardware():
raise ImportError("no nvidia GPU device found")
mod_ver = get_nvidia_module_version()
if mod_ver<(522, 6):
vstr = ".".join(str(x) for x in mod_ver)
raise ImportError(f"nvidia module {vstr} is too old, version 522.6 or later is required")
from xpra.codecs.codec_checks import TEST_PICTURES
#options = {"cuda-device-context" : get_device_context()}
for bdata in TEST_PICTURES["jpeg"]:
Expand Down

0 comments on commit 3fa5760

Please sign in to comment.