File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -487,12 +487,10 @@ std::string ConvertBlockToEngine(
487
487
std::unordered_map<c10::OperatorName, std::string> GetUnsupportedOpsInBlock (const torch::jit::Block* b) {
488
488
std::unordered_map<c10::OperatorName, std::string> unsupported_ops;
489
489
for (const auto n : b->nodes ()) {
490
- if (n->kind () != torch::jit::prim::Loop && n->kind () != torch::jit::prim::If && !OpSupported (n) &&
491
- n->kind () != torch::jit::prim::DictConstruct) {
492
- auto schema = n->maybeSchema ();
493
- TORCHTRT_CHECK (
494
- schema,
495
- " Unable to get schema for Node " << util::node_info (n) << " (conversion.VerifyCoverterSupportForBlock)" );
490
+ auto schema = n->maybeSchema ();
491
+ // Some ops like torch::jit::prim::Loop, torch::jit::prim::If, torch::jit::prim::DictConstruct don't have a schema but they are supported.
492
+ // torch::jit::prim::DictConstruct is supported via fallback only
493
+ if (schema && !OpSupported (n)) {
496
494
std::stringstream ss;
497
495
ss << *schema;
498
496
unsupported_ops[schema->operator_name ()] = ss.str ();
You can’t perform that action at this time.
0 commit comments