We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 11bcb98 commit 7b6733bCopy full SHA for 7b6733b
core/conversion/converters/impl/stack.cpp
@@ -19,9 +19,16 @@ auto stack_registrations TORCHTRT_UNUSED = RegisterNodeConversionPatterns().patt
19
[](ConversionCtx* ctx, const torch::jit::Node* n, args& args) -> bool {
20
auto in = args[0].IValue()->toListRef();
21
auto dim = args[1].unwrapToInt();
22
+ if (-1 == dim) {
23
+ auto first_in = in[0];
24
+ if (first_in.isTensor()) {
25
+ dim = first_in.toTensor().ndimension();
26
+ } else {
27
+ dim = first_in.toCustomClass<TensorContainer>()->tensor()->getDimensions().nbDims;
28
+ }
29
30
31
std::vector<nvinfer1::ITensor*> tensors;
-
32
for (auto t : in) {
33
nvinfer1::ITensor* itensor;
34
0 commit comments