torchnvjpeg icon indicating copy to clipboard operation
torchnvjpeg copied to clipboard

parallel decode fail

Open jarun-title opened this issue 5 months ago • 0 comments

I can run single decode and batch decode perfectly fine but parallel decode give me this error

{
	"name": "RuntimeError",
	"message": "Caught an unknown exception!",
	"stack": "---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
Cell In[22], line 15
     12     decoder, data = args
     13     return decoder.decode(data)
---> 15 image_tensor_list = pool.map(run, zip(decoder_list, binary_images))

File ~/.conda/envs/deepface/lib/python3.10/multiprocessing/pool.py:367, in Pool.map(self, func, iterable, chunksize)
    362 def map(self, func, iterable, chunksize=None):
    363     '''
    364     Apply `func` to each element in `iterable`, collecting the results
    365     in a list that is returned.
    366     '''
--> 367     return self._map_async(func, iterable, mapstar, chunksize).get()

File ~/.conda/envs/deepface/lib/python3.10/multiprocessing/pool.py:774, in ApplyResult.get(self, timeout)
    772     return self._value
    773 else:
--> 774     raise self._value

File ~/.conda/envs/deepface/lib/python3.10/multiprocessing/pool.py:125, in worker(inqueue, outqueue, initializer, initargs, maxtasks, wrap_exception)
    123 job, i, func, args, kwds = task
    124 try:
--> 125     result = (True, func(*args, **kwds))
    126 except Exception as e:
    127     if wrap_exception and func is not _helper_reraises_exception:

File ~/.conda/envs/deepface/lib/python3.10/multiprocessing/pool.py:48, in mapstar(args)
     47 def mapstar(args):
---> 48     return list(map(*args))

Cell In[22], line 13, in run(args)
     11 def run(args):
     12     decoder, data = args
---> 13     return decoder.decode(data)

RuntimeError: Caught an unknown exception!"
}

system information torch 2.2.2 torchnvjpeg 0.1.0 cuda 12.1 ubuntu 22.04

jarun-title avatar Sep 11 '24 04:09 jarun-title