DriveWorks SDK Reference
5.16.65 Release
For Test and Development only

TensorStreamer.h
Go to the documentation of this file.
1
2//
3// Notice
4// ALL NVIDIA DESIGN SPECIFICATIONS AND CODE ("MATERIALS") ARE PROVIDED "AS IS" NVIDIA MAKES
5// NO REPRESENTATIONS, WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
6// THE MATERIALS, AND EXPRESSLY DISCLAIMS ANY IMPLIED WARRANTIES OF NONINFRINGEMENT,
7// MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8//
9// NVIDIA CORPORATION & AFFILIATES assumes no responsibility for the consequences of use of such
10// information or for any infringement of patents or other rights of third parties that may
11// result from its use. No license is granted by implication or otherwise under any patent
12// or patent rights of NVIDIA CORPORATION & AFFILIATES. No third party distribution is allowed unless
13// expressly authorized by NVIDIA. Details are subject to change without notice.
14// This code supersedes and replaces all information previously supplied.
15// NVIDIA CORPORATION & AFFILIATES products are not authorized for use as critical
16// components in life support devices or systems without express written approval of
17// NVIDIA CORPORATION & AFFILIATES.
18//
19// SPDX-FileCopyrightText: Copyright (c) 2020-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
20// SPDX-License-Identifier: LicenseRef-NvidiaProprietary
21//
22// NVIDIA CORPORATION, its affiliates and licensors retain all intellectual
23// property and proprietary rights in and to this material, related
24// documentation and any modifications thereto. Any use, reproduction,
25// disclosure or distribution of this material and related documentation
26// without an express license agreement from NVIDIA CORPORATION or
27// its affiliates is strictly prohibited.
28//
30
47#ifndef DW_INTEROP_TENSORSTREAMER_H_
48#define DW_INTEROP_TENSORSTREAMER_H_
49
51
52#ifdef __cplusplus
53extern "C" {
54#endif
55
57typedef struct dwDNNTensorStreamerObject* dwDNNTensorStreamerHandle_t;
58
82
101
120
138
153
170
183
195
207
208#ifdef __cplusplus
209}
210#endif
211
213#endif // DW_INTEROP_TENSORSTREAMER_H_
dwStatus
Status definition.
Definition: ErrorDefs.h:44
NVIDIA DriveWorks API: DNNTensor Structures and Methods
int64_t dwTime_t
Specifies a timestamp unit, in microseconds.
Definition: BasicTypes.h:65
struct dwContextObject * dwContextHandle_t
Context handle.
Definition: Context.h:86
#define DW_API_PUBLIC
Definition: Exports.h:56
dwDNNTensorType
Speficies the type of a tensor.
Definition: Tensor.h:64
struct dwDNNTensorObject * dwDNNTensorHandle_t
Handles representing Deep Neural Network interface.
Definition: Tensor.h:57
Specifies DNNTensor properties.
Definition: Tensor.h:97
DW_API_PUBLIC dwStatus dwDNNTensorStreamer_producerSend(dwDNNTensorHandle_t tensor, dwDNNTensorStreamerHandle_t streamer)
Sends an tensor through the streamer acting as the producer.
DW_API_PUBLIC dwStatus dwDNNTensorStreamer_consumerReceive(dwDNNTensorHandle_t *tensor, dwTime_t timeout_us, dwDNNTensorStreamerHandle_t streamer)
Receive a pointer to a dwDNNTensorHandle_t from the streamer, acting as a consumer.
DW_API_PUBLIC dwStatus dwDNNTensorStreamer_initialize(dwDNNTensorStreamerHandle_t *streamer, const dwDNNTensorProperties *from, dwDNNTensorType to, dwContextHandle_t ctx)
Creates and initializes the tensor streamer capable of moving tensors between different API types.
struct dwDNNTensorStreamerObject * dwDNNTensorStreamerHandle_t
Handle for dnn tensor streamer.
DW_API_PUBLIC dwStatus dwDNNTensorStreamer_setCUDAStream(cudaStream_t stream, dwDNNTensorStreamerHandle_t streamer)
Sets the CUDA stream for CUDA related streaming operations such as post and receive.
DW_API_PUBLIC dwStatus dwDNNTensorStreamer_getOutputProperties(dwDNNTensorProperties *props, dwDNNTensorStreamerHandle_t const streamer)
Get tensor properties of the tensor received from the streamer.
DW_API_PUBLIC dwStatus dwDNNTensorStreamer_release(dwDNNTensorStreamerHandle_t streamer)
Releases the tensor streamer.
DW_API_PUBLIC dwStatus dwDNNTensorStreamer_producerReturn(dwDNNTensorHandle_t *tensor, dwTime_t timeout_us, dwDNNTensorStreamerHandle_t streamer)
The producer streamer waits for the tensor sent to be returned by the consumer.
DW_API_PUBLIC dwStatus dwDNNTensorStreamer_consumerReturn(dwDNNTensorHandle_t *tensor, dwDNNTensorStreamerHandle_t streamer)
Return the received tensor back to the producer.
DW_API_PUBLIC dwStatus dwDNNTensorStreamer_getCUDAStream(cudaStream_t *stream, dwDNNTensorStreamerHandle_t streamer)
Get CUDA stream used by the tensor streamer.