You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#if NV_TENSORRT_MAJOR < 7 || (NV_TENSORRT_MAJOR == 7 && NV_TENSORRT_MINOR < 1) // IF TRT VERSION <= 7.0
340
-
if (!align_corners) {
341
-
TORCHTRT_THROW_ERROR(
342
-
"Unable to convert node: "
343
-
<< util::node_info(n) << "\nupsample_linear1d only supports align_corner with TensorRT <= 7.0.");
344
-
} else {
345
-
resize_layer_size(ctx, n, in, {}, padded_scales, nvinfer1::ResizeMode::kLINEAR, true);
346
-
}
347
-
#else
348
-
TORCHTRT_CHECK(
349
-
!(align_corners && ctx->input_is_dynamic),
350
-
"Torch-TensorRT currently does not support the compilation of dynamic engines from code using using PyTorch [bi/tri]linear interpolation via scale factor and align_corners=True");
351
-
if (align_corners) {
352
-
// Align corners and scale factor behave slightly different together in TRT and PyTorch so run the
353
-
// layer in ATen to maintain consistancy between Torch-TensorRT and PyTorch
#if NV_TENSORRT_MAJOR < 7 || (NV_TENSORRT_MAJOR == 7 && NV_TENSORRT_MINOR < 1) // IF TRT VERSION <= 7.0
404
-
if (!align_corners) {
405
-
TORCHTRT_THROW_ERROR(
406
-
"Unable to convert node: "
407
-
<< util::node_info(n) << "\nupsample_linear1d only supports align_corner with TensorRT <= 7.0.");
408
-
} else {
409
-
resize_layer_size(ctx, n, in, {}, padded_scales, nvinfer1::ResizeMode::kLINEAR, true);
410
-
}
411
-
#else
412
-
TORCHTRT_CHECK(
413
-
!(align_corners && ctx->input_is_dynamic),
414
-
"Torch-TensorRT currently does not support the compilation of dynamc engines from code using PyTorch [bi/tri]linear interpolation via scale factor and align_corners=True");
415
-
if (align_corners) {
416
-
// Align corners and scale factor behave slightly different together in TRT and PyTorch so run the
417
-
// layer in ATen to maintain consistancy between Torch-TensorRT and PyTorch
#if NV_TENSORRT_MAJOR < 7 || (NV_TENSORRT_MAJOR == 7 && NV_TENSORRT_MINOR < 1) // IF TRT VERSION <= 7.0
468
-
if (!align_corners) {
469
-
TORCHTRT_THROW_ERROR(
470
-
"Unable to convert node: "
471
-
<< util::node_info(n) << "\nupsample_linear2d only supports align_corner with TensorRT <= 7.0.");
472
-
} else {
473
-
resize_layer_size(ctx, n, in, {}, padded_scales, nvinfer1::ResizeMode::kLINEAR, true);
474
-
}
475
-
#else
476
-
TORCHTRT_CHECK(
477
-
!(align_corners && ctx->input_is_dynamic),
478
-
"Torch-TensorRT currently does not support the compilation of dynamc engines from code using PyTorch [bi/tri]linear interpolation via scale factor and align_corners=True");
479
-
if (align_corners) {
480
-
// Align corners and scale factor behave slightly different together in TRT and PyTorch so run the
481
-
// layer in ATen to maintain consistancy between Torch-TensorRT and PyTorch
#if NV_TENSORRT_MAJOR < 7 || (NV_TENSORRT_MAJOR == 7 && NV_TENSORRT_MINOR < 1) // IF TRT VERSION <= 7.0
555
-
if (!align_corners) {
556
-
TORCHTRT_THROW_ERROR(
557
-
"Unable to convert node: "
558
-
<< util::node_info(n) << "\nupsample_linear2d only supports align_corner with TensorRT <= 7.0.");
559
-
} else {
560
-
resize_layer_size(ctx, n, in, {}, padded_scales, nvinfer1::ResizeMode::kLINEAR, true);
561
-
}
562
-
#else
563
-
TORCHTRT_CHECK(
564
-
!(align_corners && ctx->input_is_dynamic),
565
-
"Torch-TensorRT currently does not support the compilation of dynamc engines from code using PyTorch [bi/tri]linear interpolation via scale factor and align_corners=True");
566
-
if (align_corners) {
567
-
// Align corners and scale factor behave slightly different together in TRT and PyTorch so run the
568
-
// layer in ATen to maintain consistancy between Torch-TensorRT and PyTorch
#if NV_TENSORRT_MAJOR < 7 || (NV_TENSORRT_MAJOR == 7 && NV_TENSORRT_MINOR < 1) // IF TRT VERSION <= 7.0
642
-
if (!align_corners) {
643
-
TORCHTRT_THROW_ERROR(
644
-
"Unable to convert node: "
645
-
<< util::node_info(n) << "\nupsample_linear3d only supports align_corner with TensorRT <= 7.0.");
646
-
} else {
647
-
resize_layer_size(ctx, n, in, {}, padded_scales, nvinfer1::ResizeMode::kLINEAR, true);
648
-
}
649
-
#else
650
-
TORCHTRT_CHECK(
651
-
!(align_corners && ctx->input_is_dynamic),
652
-
"Torch-TensorRT currently does not support the compilation of dynamc engines from code using PyTorch [bi/tri]linear interpolation via scale factor and align_corners=True");
653
-
if (align_corners) {
654
-
// Align corners and scale factor behave slightly different together in TRT and PyTorch so run the
655
-
// layer in ATen to maintain consistancy between Torch-TensorRT and PyTorch
#if NV_TENSORRT_MAJOR < 7 || (NV_TENSORRT_MAJOR == 7 && NV_TENSORRT_MINOR < 1) // IF TRT VERSION <= 7.0
730
-
if (!align_corners) {
731
-
TORCHTRT_THROW_ERROR(
732
-
"Unable to convert node: "
733
-
<< util::node_info(n) << "\nupsample_linear3d only supports align_corner with TensorRT <= 7.0.");
734
-
} else {
735
-
resize_layer_size(ctx, n, in, {}, padded_scales, nvinfer1::ResizeMode::kLINEAR, true);
736
-
}
737
-
#else
738
-
TORCHTRT_CHECK(
739
-
!(align_corners && ctx->input_is_dynamic),
740
-
"Torch-TensorRT currently does not support the compilation of dynamc engines from code using PyTorch [bi/tri]linear interpolation via scale factor and align_corners=True");
741
-
if (align_corners) {
742
-
// Align corners and scale factor behave slightly different together in TRT and PyTorch so run the
743
-
// layer in ATen to maintain consistancy between Torch-TensorRT and PyTorch
0 commit comments