@@ -448,15 +448,16 @@ auto element_wise_registrations TRTORCH_UNUSED =
448
448
auto self = args[0 ].ITensorOrFreeze (ctx);
449
449
auto other = args[1 ].ITensorOrFreeze (ctx);
450
450
451
- auto greater =
452
- add_elementwise ( ctx, nvinfer1::ElementWiseOperation::kGREATER , self, other, util::node_info (n)+ " _greater" );
451
+ auto greater = add_elementwise (
452
+ ctx, nvinfer1::ElementWiseOperation::kGREATER , self, other, util::node_info (n) + " _greater" );
453
453
TRTORCH_CHECK (greater, " Unable to create Greater layer from node: " << *n);
454
454
455
- auto equal =
456
- add_elementwise ( ctx, nvinfer1::ElementWiseOperation::kEQUAL , self, other, util::node_info (n)+ " _equal" );
455
+ auto equal = add_elementwise (
456
+ ctx, nvinfer1::ElementWiseOperation::kEQUAL , self, other, util::node_info (n) + " _equal" );
457
457
TRTORCH_CHECK (equal, " Unable to create Equal layer from node: " << *n);
458
458
459
- auto or_op = ctx->net ->addElementWise (*greater->getOutput (0 ), *equal->getOutput (0 ), nvinfer1::ElementWiseOperation::kOR );
459
+ auto or_op = ctx->net ->addElementWise (
460
+ *greater->getOutput (0 ), *equal->getOutput (0 ), nvinfer1::ElementWiseOperation::kOR );
460
461
461
462
TRTORCH_CHECK (or_op, " Unable to create Or layer from node: " << *n);
462
463
or_op->setName (util::node_info (n).c_str ());
@@ -472,15 +473,16 @@ auto element_wise_registrations TRTORCH_UNUSED =
472
473
auto otherScalar = args[1 ].unwrapToScalar ().to <float >();
473
474
auto other = tensor_to_const (ctx, torch::tensor ({otherScalar}));
474
475
475
- auto greater =
476
- add_elementwise ( ctx, nvinfer1::ElementWiseOperation::kGREATER , self, other, util::node_info (n)+ " _greater" );
476
+ auto greater = add_elementwise (
477
+ ctx, nvinfer1::ElementWiseOperation::kGREATER , self, other, util::node_info (n) + " _greater" );
477
478
TRTORCH_CHECK (greater, " Unable to create Greater layer from node: " << *n);
478
479
479
- auto equal =
480
- add_elementwise ( ctx, nvinfer1::ElementWiseOperation::kEQUAL , self, other, util::node_info (n)+ " _equal" );
480
+ auto equal = add_elementwise (
481
+ ctx, nvinfer1::ElementWiseOperation::kEQUAL , self, other, util::node_info (n) + " _equal" );
481
482
TRTORCH_CHECK (equal, " Unable to create Equal layer from node: " << *n);
482
483
483
- auto or_op = ctx->net ->addElementWise (*greater->getOutput (0 ), *equal->getOutput (0 ), nvinfer1::ElementWiseOperation::kOR );
484
+ auto or_op = ctx->net ->addElementWise (
485
+ *greater->getOutput (0 ), *equal->getOutput (0 ), nvinfer1::ElementWiseOperation::kOR );
484
486
485
487
TRTORCH_CHECK (or_op, " Unable to create Or layer from node: " << *n);
486
488
or_op->setName (util::node_info (n).c_str ());
@@ -495,15 +497,16 @@ auto element_wise_registrations TRTORCH_UNUSED =
495
497
auto self = args[0 ].ITensorOrFreeze (ctx);
496
498
auto other = args[1 ].ITensorOrFreeze (ctx);
497
499
498
- auto less =
499
- add_elementwise ( ctx, nvinfer1::ElementWiseOperation::kLESS , self, other, util::node_info (n)+ " _less" );
500
+ auto less = add_elementwise (
501
+ ctx, nvinfer1::ElementWiseOperation::kLESS , self, other, util::node_info (n) + " _less" );
500
502
TRTORCH_CHECK (less, " Unable to create Less layer from node: " << *n);
501
503
502
- auto equal =
503
- add_elementwise ( ctx, nvinfer1::ElementWiseOperation::kEQUAL , self, other, util::node_info (n)+ " _equal" );
504
+ auto equal = add_elementwise (
505
+ ctx, nvinfer1::ElementWiseOperation::kEQUAL , self, other, util::node_info (n) + " _equal" );
504
506
TRTORCH_CHECK (equal, " Unable to create Equal layer from node: " << *n);
505
507
506
- auto or_op = ctx->net ->addElementWise (*less->getOutput (0 ), *equal->getOutput (0 ), nvinfer1::ElementWiseOperation::kOR );
508
+ auto or_op = ctx->net ->addElementWise (
509
+ *less->getOutput (0 ), *equal->getOutput (0 ), nvinfer1::ElementWiseOperation::kOR );
507
510
508
511
TRTORCH_CHECK (or_op, " Unable to create Or layer from node: " << *n);
509
512
or_op->setName (util::node_info (n).c_str ());
@@ -519,15 +522,16 @@ auto element_wise_registrations TRTORCH_UNUSED =
519
522
auto otherScalar = args[1 ].unwrapToScalar ().to <float >();
520
523
auto other = tensor_to_const (ctx, torch::tensor ({otherScalar}));
521
524
522
- auto less =
523
- add_elementwise ( ctx, nvinfer1::ElementWiseOperation::kLESS , self, other, util::node_info (n)+ " _less" );
525
+ auto less = add_elementwise (
526
+ ctx, nvinfer1::ElementWiseOperation::kLESS , self, other, util::node_info (n) + " _less" );
524
527
TRTORCH_CHECK (less, " Unable to create Less layer from node: " << *n);
525
528
526
- auto equal =
527
- add_elementwise ( ctx, nvinfer1::ElementWiseOperation::kEQUAL , self, other, util::node_info (n)+ " _equal" );
529
+ auto equal = add_elementwise (
530
+ ctx, nvinfer1::ElementWiseOperation::kEQUAL , self, other, util::node_info (n) + " _equal" );
528
531
TRTORCH_CHECK (equal, " Unable to create Equal layer from node: " << *n);
529
532
530
- auto or_op = ctx->net ->addElementWise (*less->getOutput (0 ), *equal->getOutput (0 ), nvinfer1::ElementWiseOperation::kOR );
533
+ auto or_op = ctx->net ->addElementWise (
534
+ *less->getOutput (0 ), *equal->getOutput (0 ), nvinfer1::ElementWiseOperation::kOR );
531
535
532
536
TRTORCH_CHECK (or_op, " Unable to create Or layer from node: " << *n);
533
537
or_op->setName (util::node_info (n).c_str ());
0 commit comments