| 34 | namespace { |
| 35 | |
| 36 | ImageBatchVarShape Conv2DVarShapeInto(ImageBatchVarShape &output, ImageBatchVarShape &input, ImageBatchVarShape &kernel, |
| 37 | Tensor &kernel_anchor, NVCVBorderType border, std::optional<Stream> pstream) |
| 38 | { |
| 39 | if (!pstream) |
| 40 | { |
| 41 | pstream = Stream::Current(); |
| 42 | } |
| 43 | |
| 44 | auto conv2D = CreateOperator<cvcuda::Conv2D>(); |
| 45 | |
| 46 | ResourceGuard guard(*pstream); |
| 47 | guard.add(LockMode::LOCK_MODE_READ, {input, kernel, kernel_anchor}); |
| 48 | guard.add(LockMode::LOCK_MODE_WRITE, {output}); |
| 49 | guard.add(LockMode::LOCK_MODE_NONE, {*conv2D}); |
| 50 | |
| 51 | conv2D->submit(pstream->cudaHandle(), input, output, kernel, kernel_anchor, border); |
| 52 | |
| 53 | return output; |
| 54 | } |
| 55 | |
| 56 | ImageBatchVarShape Conv2DVarShape(ImageBatchVarShape &input, ImageBatchVarShape &kernel, Tensor &kernel_anchor, |
| 57 | NVCVBorderType border, std::optional<Stream> pstream) |
no test coverage detected