Skip to content

Commit 910e948

Browse files
apbosegs-olive
authored andcommitted
Fixing select to not use torch
1 parent bfecbaf commit 910e948

File tree

1 file changed

+2
-2
lines changed
  • py/torch_tensorrt/dynamo/converters/impl

1 file changed

+2
-2
lines changed

py/torch_tensorrt/dynamo/converters/impl/select.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from typing import Optional, cast
22

3-
import torch
3+
import numpy as np
44
from torch.fx.node import Target
55

66
from torch_tensorrt.fx.types import TRTNetwork, TRTTensor, Shape
@@ -53,7 +53,7 @@ def select(
5353
output_shape = get_shape_with_dynamic_shape(
5454
network, target, source_ir, name, output_shape, input
5555
)
56-
index_value = torch.tensor(index, dtype=torch.int32)
56+
index_value = np.array(index, dtype=np.int32)
5757
indices_tensor = network.add_constant(
5858
index_value.shape, to_numpy(index_value)
5959
).get_output(0)

0 commit comments

Comments
 (0)