ITADN

[QUESTION] how to use cvcudaCopyMakeBorderVarShapeSubmit

#269OpenLianJunjian 创建于 2025-10-27
question
L
LianJunjiancommented
[//]: # "SPDX-FileCopyrightText: Copyright (c) 2022-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved." [//]: # "SPDX-License-Identifier: Apache-2.0" [//]: # "" [//]: # "Licensed under the Apache License, Version 2.0 (the 'License');" [//]: # "you may not use this file except in compliance with the License." [//]: # "You may obtain a copy of the License at" [//]: # "http://www.apache.org/licenses/LICENSE-2.0" [//]: # "" [//]: # "Unless required by applicable law or agreed to in writing, software" [//]: # "distributed under the License is distributed on an 'AS IS' BASIS" [//]: # "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied." [//]: # "See the License for the specific language governing permissions and" [//]: # "limitations under the License." how to use cvcudaCopyMakeBorderVarShapeSubmit interface . how to create nvcv::Tensor &left and nvcv::Tensor &top. I had try: nvcv::TensorShape::DimType dims[1] = {static_cast<nvcv::TensorShape::DimType>(curN)}; nvcv::TensorShape::ShapeType s(dims, 1); nvcv::Tensor tTop (nvcv::TensorShape(s, nvcv::TENSOR_W), nvcv::DataType(NVCV_DATA_TYPE_S32)); opBorderBatch(cu_stream_, /*in*/ ibResized, /*out*/ ibCanvas, /*top*/ tTop, /*left*/tLeft, /*mode*/NVCVBorderType::NVCV_BORDER_CONSTANT, /*val*/ float4({br, bg, bb, 0.f})); but got error: terminate called after throwing an instance of 'nvcv::Exception' what(): NVCV_ERROR_INVALID_ARGUMENT: Tensor layout not supported
0 条评论