mirror of
https://github.com/opencv/opencv.git
synced 2025-06-11 20:09:23 +08:00
Merge pull request #17791 from YashasSamaga:cuda4dnn-fix-concat-fusion
This commit is contained in:
commit
ff992183b2
@ -2972,7 +2972,6 @@ struct Net::Impl : public detail::NetImplBase
|
||||
ld.outputBlobsWrappers[0] = wrap(output);
|
||||
#endif
|
||||
std::vector<Range> chrange(output.dims, Range::all());
|
||||
|
||||
int ofs = 0;
|
||||
for( i = 0; i < ninputs; i++ )
|
||||
{
|
||||
@ -3000,9 +2999,9 @@ struct Net::Impl : public detail::NetImplBase
|
||||
if (preferableBackend == DNN_BACKEND_CUDA)
|
||||
{
|
||||
auto cuda_wrapper = wrap(output).dynamicCast<CUDABackendWrapper>();
|
||||
auto offset = chrange[1].start * (output.size[2] * output.size[3]);
|
||||
auto shape = MatShape{1, chrange[1].size(), output.size[2], output.size[3]};
|
||||
cuda_wrapper->update(shape, offset);
|
||||
auto offset = chrange[axis].start * output_slice.total(axis + 1, output.dims);
|
||||
auto new_shape = shape(output_slice);
|
||||
cuda_wrapper->update(new_shape, offset);
|
||||
inp_i_data->outputBlobsWrappers[pin.oid] = cuda_wrapper.staticCast<BackendWrapper>();
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user