Skip to content

Commit

Permalink
add int32 support
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangjun committed Jan 21, 2022
1 parent fec3c5b commit 132a0eb
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions paddle/fluid/inference/tensorrt/convert/reduce_op.cc
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ class ReduceOpConverter : public OpConverter {
}

auto output_name = op_desc.Output("Out")[0];
layer->getOutput(0)->setType(layer->getInput(0)->getType());
RreplenishLayerAndOutput(layer, op_type, {output_name}, test_mode);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def generate_input1(dtype, attrs: List[Dict[str, Any]]):
for dim in [[], [1], [0], [0, 1], [1, 2, 3], [-2, 0, 3], [-3],
[-4, 1], [3, 4, 5]]:
for reduce_all in [True, False]:
for out_dtype in [-1, 5]:
for out_dtype in [-1, 2, 5]:
dics = [{
"keep_dim": keep_dim,
"dim": dim,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def generate_input1(dtype, attrs: List[Dict[str, Any]]):
for dim in [[], [1], [0], [0, 1], [1, 2, 3], [-2, 0, 3], [-3],
[-4, 1], [3, 4, 5]]:
for reduce_all in [True, False]:
for out_dtype in [-1, 5]:
for out_dtype in [-1, 2, 5]:
dics = [{
"keep_dim": keep_dim,
"dim": dim,
Expand Down

0 comments on commit 132a0eb

Please sign in to comment.