Closed Gotta-C closed 3 years ago
the same problem when run with multiprocessing, i guess nvjpeg handler needs some resource which conflict with other processes.
Thanks @Gotta-C @ald2004 . I have fixed this bug in version 0.0.8. You can try the test file tests/test-with-multiprocessing.py that tests for running with ThreadPoolExecutor.
nj = NvJpeg()
SystemError: <class 'nvjpeg.NvJpeg'> returned NULL without setting an error run above 5 times and succeed once
TurboJPEG encode 0.004872s per image as 1 cpu core NvJpeg encode 0.001235s per image as 1 gpu
test encode is normal and can the lib support ThreadPoolExecutor or how to modify in nvjpeg-python.c to support that.