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
// IGatherLayer takes in input tensor, the indices, and the axis of input tensor to take indices
282
-
// from
283
-
auto gather_layer = ctx->net->addGather(*in, *indicesTensor, 0);
284
-
TORCHTRT_CHECK(gather_layer, "Unable to create gather layer from node: " << *n);
285
-
auto gather_out = gather_layer->getOutput(0);
273
+
// In TorchScript, aten::index.Tensor indexes the self tensor along its each dimension by several
274
+
// indexes. In this version of Torch-TensorRT, it can only receive one index tensor which means it only
275
+
// indexes the self tensor along dimension 0.
276
+
TORCHTRT_CHECK(
277
+
tensors.size() == 1,
278
+
"In this version of Torch-TensorRT, aten::index.Tensor can only receive one index tensor which means it only indexes the self tensor along dimension 0.");
279
+
auto indicesTensor = tensors[0];
280
+
// Set datatype for indices tensor to INT32
281
+
auto identity = ctx->net->addIdentity(*indicesTensor);
0 commit comments