Skip to content

Commit

Permalink
fix: support dict type for input in shape analysis
Browse files Browse the repository at this point in the history
Signed-off-by: Bo Wang <[email protected]>
  • Loading branch information
bowang007 committed Apr 28, 2022
1 parent 1c294fa commit 630f9c4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions core/partitioning/shape_analysis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ void getSegmentsOutputByRunning(
jit_inputs_ivalues.push_back(ivalues_maps[input].toTuple());
} else if (input->type()->kind() == torch::jit::TypeKind::NumberType) {
jit_inputs_ivalues.push_back(ivalues_maps[input].toScalar());
} else if (input->type()->kind() == torch::jit::TypeKind::DictType) {
jit_inputs_ivalues.push_back(ivalues_maps[input].toGenericDict());
} else {
TORCHTRT_THROW_ERROR(
"Expected to find type " << input->type()->str() << " for value " << input->debugName()
Expand Down

0 comments on commit 630f9c4

Please sign in to comment.