Skip to content

Commit a245b86

Browse files
authored
Merge pull request #1785 from pytorch/fix_unfound_str_type
fix: include str ivalue type conversion
2 parents e20d70a + 37b5d5c commit a245b86

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

core/partitioning/shape_analysis.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,8 @@ void getSegmentsOutputByRunning(
195195
jit_inputs_ivalues.push_back(ivalues_maps[input].toBool());
196196
} else if (input->type()->isSubtypeOf(torch::jit::FloatType::get())) {
197197
jit_inputs_ivalues.push_back(ivalues_maps[input].toDouble());
198+
} else if (input->type()->isSubtypeOf(torch::jit::StringType::get())) {
199+
jit_inputs_ivalues.push_back(ivalues_maps[input].toString());
198200
} else if (input->type()->kind() == torch::jit::TypeKind::ListType) {
199201
// create list
200202
jit_inputs_ivalues.push_back(ivalues_maps[input].toList());

0 commit comments

Comments
 (0)