Skip to content

Commit d7d1511

Browse files
committed
fix: Getting unsupported ops will now bypass non-schema ops avoiding redundant failures
Signed-off-by: Dheeraj Peri <[email protected]>
1 parent 01d98c7 commit d7d1511

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

core/conversion/conversion.cpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -487,12 +487,10 @@ std::string ConvertBlockToEngine(
487487
std::unordered_map<c10::OperatorName, std::string> GetUnsupportedOpsInBlock(const torch::jit::Block* b) {
488488
std::unordered_map<c10::OperatorName, std::string> unsupported_ops;
489489
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)) {
496494
std::stringstream ss;
497495
ss << *schema;
498496
unsupported_ops[schema->operator_name()] = ss.str();

0 commit comments

Comments
 (0)