INNER CODE UNIT · Python

match_vsdot_patten

PaddlePaddle/Paddle-Lite · lite/tools/convert_arm_vsdot_to_machine_code.py:37

def match_vsdot_patten(line):
    matched = re.search(
        r'vsdot.s8\s+q(.*?)\s*,\s*q(.*?)\s*,\s*d(.*?)\[(.*?)\].*', line, re.M |
        re.I)
    if matched:
        vd = int(matched.group(1))
        vn = int(matched.group(2))
        vm = int(matched.group(3))
        idx = int(matched.group(4))
        return compute_vsdot_vec_elem(vd, vn, vm, idx)
    else:
        return line


def parser_file(file_in, file_out):
    out = open(file_out, 'w')
    if os.path.exists(file_in):
        for line in open(file_in):

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…