@@ -145,11 +145,12 @@ TEST_P(OperatorTraceTest, OperatorTraceTest) {
145
145
for (int i = 0 ; i < prefetch_depth; i++) {
146
146
daliShareOutput (&h);
147
147
148
- for (size_t i = 0 ; i < std::size (operator_under_test_names); ++i ) {
149
- const char *operator_name = operator_under_test_names[i ];
150
- const char *trace_name = operator_trace_names[i ];
148
+ for (size_t op = 0 ; op < std::size (operator_under_test_names); op++ ) {
149
+ const char *operator_name = operator_under_test_names[op ];
150
+ const char *trace_name = operator_trace_names[op ];
151
151
EXPECT_EQ (daliHasOperatorTrace (&h, operator_name, " this_trace_does_not_exist" ), 0 );
152
- ASSERT_NE (daliHasOperatorTrace (&h, operator_name, trace_name), 0 ) << " name: " << trace_name;
152
+ ASSERT_NE (daliHasOperatorTrace (&h, operator_name, trace_name), 0 )
153
+ << " operator_name: " << operator_name << " \n trace_name: " << trace_name;
153
154
154
155
EXPECT_EQ (std::string (daliGetOperatorTrace (&h, operator_name, trace_name)),
155
156
make_string (" test_value" , iteration * prefetch_depth + i));
@@ -194,11 +195,13 @@ class OperatorTraceTestExternalInput : public OperatorTraceTest {
194
195
pipeline_->AddOperator (OpSpec (" PassthroughWithTraceOp" )
195
196
.AddArg (" device" , " cpu" )
196
197
.AddInput (" OP_TRACE_IN_CPU" , " cpu" )
198
+ .AddArg (" trace_name" , operator_trace_names[0 ])
197
199
.AddOutput (" PT_CPU" , " cpu" ),
198
200
operator_under_test_names[0 ]);
199
201
pipeline_->AddOperator (OpSpec (" PassthroughWithTraceOp" )
200
202
.AddArg (" device" , " gpu" )
201
203
.AddInput (" OP_TRACE_IN_GPU" , " gpu" )
204
+ .AddArg (" trace_name" , operator_trace_names[1 ])
202
205
.AddOutput (" PT_GPU" , " gpu" ),
203
206
operator_under_test_names[1 ]);
204
207
@@ -262,11 +265,12 @@ TEST_P(OperatorTraceTestExternalInput, OperatorTraceTestExternalInput) {
262
265
for (int i = 0 ; i < prefetch_depth; i++) {
263
266
daliShareOutput (&h);
264
267
265
- for (size_t i = 0 ; i < std::size (operator_under_test_names); i ++) {
266
- const char *operator_name = operator_under_test_names[i ];
267
- const char *trace_name = operator_trace_names[i ];
268
+ for (size_t op = 0 ; op < std::size (operator_under_test_names); op ++) {
269
+ const char *operator_name = operator_under_test_names[op ];
270
+ const char *trace_name = operator_trace_names[op ];
268
271
EXPECT_EQ (daliHasOperatorTrace (&h, operator_name, " this_trace_does_not_exist" ), 0 );
269
- ASSERT_NE (daliHasOperatorTrace (&h, operator_name, trace_name), 0 ) << " name: " << trace_name;
272
+ ASSERT_NE (daliHasOperatorTrace (&h, operator_name, trace_name), 0 )
273
+ << " operator_name: " << operator_name << " \n trace_name: " << trace_name;
270
274
271
275
EXPECT_EQ (std::string (daliGetOperatorTrace (&h, operator_name, trace_name)),
272
276
make_string (" test_value" , iteration * prefetch_depth + i));
0 commit comments