Skip to content

Commit 6247d07

Browse files
committed
Add assert for not-custom ops
1 parent 0c59ba4 commit 6247d07

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Builder/FrontendDialectTransformer.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -916,6 +916,11 @@ class FrontendGenImpl {
916916
<< " contains subgraph attributes but does not "
917917
"implement HasOnnxSubgraphOpInterface interface. The "
918918
"subgraph will be dropped.\n";
919+
if constexpr (!std::is_same_v<T, ONNXCustomOp>) {
920+
assert(false && "Not-custom ops must implement "
921+
"HasOnnxSubgraphOpInterface if they have "
922+
"subgraph attributes.");
923+
}
919924
continue;
920925
}
921926
auto opWithSubgraph =

0 commit comments

Comments
 (0)