Compute Graph Framework SDK Reference  5.10
dwTraceNode.hpp
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-2022 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
31#ifndef DWFRAMEWORK_DWNODES_DWTRACE_TRACENODE_DWTRACENODE_HPP_
32#define DWFRAMEWORK_DWNODES_DWTRACE_TRACENODE_DWTRACENODE_HPP_
33
34#include <dwcgf/node/Node.hpp>
37#include <dwcgf/port/Port.hpp>
40
41namespace dw
42{
43namespace framework
44{
45
47{
48 // Use this flag when traces are deterministic. When there is uncontrollably large amount of trace(Ex. DW Channel traces),
49 // it is good to disable this flag. After disabling this flag traces won't be dropped.
50 bool stmControlTracing;
51 // DWTrace supports total 32 channels. Following mask allows to enable/disable specific channels.
52 // Only Enabled channels allocated buffers for their channel. This value must match channelMask provided to dwTraceCollectorNode.
53 uint32_t channelMask;
54 // Max trace limit that a channel can handle per epoch.
56};
57
62{
63public:
64 static constexpr char LOG_TAG[] = "dwTraceNode";
65
66 static constexpr auto describeInputPorts()
67 {
69 }
70
71 static constexpr auto describeOutputPorts()
72 {
75 }
76
77 static constexpr auto describePasses()
78 {
80 describePass("SETUP"_sv, DW_PROCESSOR_TYPE_CPU),
81 describePass("PASS_PROCESS"_sv, DW_PROCESSOR_TYPE_CPU),
82 describePass("TEARDOWN"_sv, DW_PROCESSOR_TYPE_CPU));
83 }
84
85 static constexpr auto describeParameters()
86 {
87 return describeConstructorArguments<dwTraceNodeParams, dwContextHandle_t>(
90 bool,
91 "stmControlTracing"_sv,
92 &dwTraceNodeParams::stmControlTracing),
94 uint32_t,
95 "channelMask"_sv,
98 uint32_t,
99 "maxTracesPerChPerEpoch"_sv,
103 dwContextHandle_t)));
104 }
105
106 static std::unique_ptr<dwTraceNode> create(ParameterProvider& provider);
107
108 dwTraceNode(const dwTraceNodeParams& params, const dwContextHandle_t ctx); // context handle is not required in this node
109};
110
111} // namespace framework
112} // namespace dw
113
114#endif // DWFRAMEWORK_DWNODES_DWTRACE_TRACENODE_DWTRACENODE_HPP_
#define DW_DESCRIBE_UNNAMED_PARAMETER(TYPE_NAME, args...)
#define DW_DESCRIBE_PARAMETER(TYPE_NAME, args...)
#define DW_DESCRIBE_PORT(TYPE_NAME, args...)
The interface to access parameter values identified by name and/or (semantic) type.
static constexpr auto describeInputPorts()
Definition: dwTraceNode.hpp:66
static constexpr auto describeParameters()
Definition: dwTraceNode.hpp:85
static constexpr auto describePasses()
Definition: dwTraceNode.hpp:77
static constexpr auto describeOutputPorts()
Definition: dwTraceNode.hpp:71
static constexpr char LOG_TAG[]
Definition: dwTraceNode.hpp:64
dwTraceNode(const dwTraceNodeParams &params, const dwContextHandle_t ctx)
static std::unique_ptr< dwTraceNode > create(ParameterProvider &provider)
constexpr auto describePortCollection(Args &&... args)
constexpr std::tuple< dw::core::StringView, dwProcessorType > describePass(dw::core::StringView const &&name, dwProcessorType processorType)
uint32_t channelMask
Definition: dwTraceNode.hpp:53
uint32_t maxTracesPerChPerEpoch
Definition: dwTraceNode.hpp:55
dwTraceNodeParams { bool stmControlTracing dwTraceNodeParams
Definition: dwTraceNode.hpp:50
constexpr auto describeConstructorArgument(const Args &&... args)
constexpr auto describePassCollection(const Args &&... args)
Definition: Buffer.hpp:40