Skip to content

Commit b6942a2

Browse files
committed
fix(//core/conversion/converters/impl): Fix interpolate.cpp
Signed-off-by: Abhiram Iyer <[email protected]> Signed-off-by: Abhiram Iyer <[email protected]>
1 parent 9a4f6de commit b6942a2

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Diff for: core/conversion/converters/impl/interpolate.cpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ namespace converters {
1111
namespace impl {
1212
namespace {
1313

14-
auto interpolate_registrations = RegisterNodeConversionPatterns()
14+
auto interpolate_registrations TRTORCH_UNUSED = RegisterNodeConversionPatterns()
1515
.pattern({
1616
"aten::upsample_nearest1d(Tensor self, int[1] output_size, float? scales=None) -> (Tensor)",
17-
[](ConversionCtx* ctx, const torch::jit::Node*n, args& args) -> bool {
17+
[](ConversionCtx* ctx, const torch::jit::Node* n, args& args) -> bool {
1818
auto in = args[0].ITensor();
1919
auto in_shape = util::toVec(in->getDimensions());
2020

@@ -37,7 +37,7 @@ auto interpolate_registrations = RegisterNodeConversionPatterns()
3737
auto layer_output = ctx->AssociateValueAndTensor(n->outputs()[0], resize_layer->getOutput(0));
3838
LOG_DEBUG("Output tensor shape: " << layer_output->getDimensions());
3939
} else {
40-
LOG_DEBUG("scale factor parameter not supported yet.");
40+
TRTORCH_THROW_ERROR("Unable to retrieve all node inputs for node: " << util::node_info(n) << "\nScale factor parameter not supported yet");
4141
}
4242

4343
return true;
@@ -67,14 +67,14 @@ auto interpolate_registrations = RegisterNodeConversionPatterns()
6767
auto layer_output = ctx->AssociateValueAndTensor(n->outputs()[0], resize_layer->getOutput(0));
6868
LOG_DEBUG("Output tensor shape: " << layer_output->getDimensions());
6969
} else {
70-
LOG_DEBUG("scale factor parameters not supported yet.");
70+
TRTORCH_THROW_ERROR("Unable to retrieve all node inputs for node: " << util::node_info(n) << "\nScale factor parameter not supported yet");
7171
}
7272

7373
return true;
7474
}
7575
}).pattern({
7676
"aten::upsample_nearest3d(Tensor self, int[3] output_size, float? scales_d=None, float? scales_h=None, float? scales_w=None) -> (Tensor)",
77-
[](ConversionCtx* ctx, const torch::jit::Node*n, args& args) -> bool {
77+
[](ConversionCtx* ctx, const torch::jit::Node* n, args& args) -> bool {
7878
auto in = args[0].ITensor();
7979
auto in_shape = util::toVec(in->getDimensions());
8080

@@ -97,7 +97,7 @@ auto interpolate_registrations = RegisterNodeConversionPatterns()
9797
auto layer_output = ctx->AssociateValueAndTensor(n->outputs()[0], resize_layer->getOutput(0));
9898
LOG_DEBUG("Output tensor shape: " << layer_output->getDimensions());
9999
} else {
100-
LOG_DEBUG("scale factor parameters not supported yet.");
100+
TRTORCH_THROW_ERROR("Unable to retrieve all node inputs for node: " << util::node_info(n) << "\nScale factor parameter not supported yet");
101101
}
102102

103103
return true;

0 commit comments

Comments
 (0)