Skip to content

Commit

Permalink
update comments and rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
zewenli98 committed Feb 9, 2024
1 parent 2bb9e2b commit 8c41f14
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions py/torch_tensorrt/dynamo/conversion/impl/pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def adaptive_avg_poolNd(
axis = -axis
positive_axis = get_positive_dim(
axis, input_rank
) # this is for calculating new shapes below
) # convert to positive axis, which is for calculating new shapes below
input_dim = input_shape[axis]
output_dim = output_size[axis]
diff = output_dim - input_dim
Expand All @@ -156,9 +156,11 @@ def adaptive_avg_poolNd(
remainder = 0
times += 1

flags = []
flags = [] # record the axis that needs to be repeated
concat_list = []
for j in range(input_dim):
for j in range(
input_dim
): # iterate the input dim to see which dim needs to be repeated or not
single_elem = impl.select.select(
ctx, target, source_ir, f"{name}_select_{axis}_{j}", input, axis, j
)
Expand Down

0 comments on commit 8c41f14

Please sign in to comment.