check_onnx_op_support.py 404 Bytes
Newer Older
charlie's avatar
charlie committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/env python3

import subprocess

onnx_dir = "../src/onnx"
ops_supported = []
with open("all_onnx_ops.txt", "r") as f:
    for op in f.readlines():
        op = op.rstrip("\n")
        result = subprocess.run(
            ["grep", "-q", "-n", "--directories=recurse", op, onnx_dir])
        if result.returncode == 0:
            ops_supported.append(op)

for op in ops_supported:
    print(op)