INNER CODE UNIT · Python

parser_file

PaddlePaddle/Paddle-Lite · lite/tools/convert_arm_sdot_to_machine_code.py:51

def parser_file(file_in, file_out):
    out = open(file_out, 'w')
    if os.path.exists(file_in):
        for line in open(file_in):
            new_line = match_sdot_patten(line)
            # print(new_line)
            out.write(new_line)
    else:
        print('input file {} not exist'.format(file_in))


if __name__ == "__main__":
    arg_parser = argparse.ArgumentParser('convert arm sdot to machine code')
    arg_parser.add_argument('--input_file', type=str, required=True)
    arg_parser.add_argument('--output_file', type=str, required=True)
    args = arg_parser.parse_args()

    print('input file: ', args.input_file)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…