-
Notifications
You must be signed in to change notification settings - Fork 355
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tile dynamic dim #3085
tile dynamic dim #3085
Conversation
shapes = [i * j for i, j in zip(input.shape, dims)] | ||
layer = ctx.net.add_slice(input, tuple(starts), tuple(shapes), tuple(strides)) | ||
else: | ||
shapes = None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should shapes be a list here ?
input, start=trt.Dims(), shape=trt.Dims(), stride=trt.Dims() | ||
) | ||
layer.set_input(1, tuple(starts)) | ||
layer.set_input(2, tuple(shapes)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like we are setting a list of ITensors as a second input. But shouldn't the second input be an ITensor (which is the concatenated output of these shapes ) ? or both of them work ?
((2,), (3,), (6,), (2, 2)), | ||
((2,), (3,), (6,), (0, 2)), | ||
# 2d cases | ||
((3, 1), (3, 1), (6, 1), (0,)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is tiling with dims = (0,) same as tiling with (1,) ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tiling with dims = (0,) results in that particular dimension as 0 in the tiled tensor. In the above case though it prepends -1 resulting in dims being (-1, 0) post which the dynamic input tensor is tiled
d70b716
to
e14badb
Compare
e14badb
to
0770cc1
Compare
No description provided.