[CVCUDA] CMake integration, vison processor CV-CUDA integration, PaddleClas support CV-CUDA (#1074)

* cvcuda resize

* cvcuda center crop

* cvcuda resize

* add a fdtensor in fdmat

* get cv mat and get tensor support gpu

* paddleclas cvcuda preprocessor

* fix compile err

* fix windows compile error

* rename reused to cached

* address comment

* remove debug code

* add comment

* add manager run

* use cuda and cuda used

* use cv cuda doc

* address comment

---------

Co-authored-by: Jason <jiangjiajun@baidu.com>
This commit is contained in:
Wang Xinyu
2023-01-30 09:33:49 +08:00
committed by GitHub
parent 0c735e9c0b
commit 62e051e21d
26 changed files with 814 additions and 216 deletions

View File

@@ -35,12 +35,13 @@ class PaddleClasPreprocessor:
"""
return self._preprocessor.run(input_ims)
def use_gpu(self, gpu_id=-1):
def use_cuda(self, enable_cv_cuda=False, gpu_id=-1):
"""Use CUDA preprocessors
:param: enable_cv_cuda: Whether to enable CV-CUDA
:param: gpu_id: GPU device id
"""
return self._preprocessor.use_gpu(gpu_id)
return self._preprocessor.use_cuda(enable_cv_cuda, gpu_id)
def disable_normalize(self):
"""
@@ -52,7 +53,7 @@ class PaddleClasPreprocessor:
"""
This function will disable hwc2chw in preprocessing step.
"""
self._preprocessor.disable_permute()
self._preprocessor.disable_permute()
class PaddleClasPostprocessor: