昇腾社区首页
中文
注册

导入bin数据文件

若用户已有输入/标杆数据bin文件,可直接调用custom_xxx接口导入bin文件。

  • 输入/输出不同地址(非原地算子
    import ascendebug
    debug_op = ascendebug.create_debug_op('add_custom'', 'VectorCore', '${chip_version}') \
            .custom_input('x', 'float16', [1, 16384], '/xxx/x.bin') \           # 输入数据文件
            .custom_input('y', 'float16', [1, 16384], '/xxx/y.bin') \
            .custom_output('z', 'float16', [1, 16384], '/xxxx/z.bin')           # golden数据文件
  • 输入/输出同地址(原地算子
    import ascendebug
    debug_op = ascendebug.create_debug_op('add_custom'', 'VectorCore', '${chip_version}') \
            .custom_input('x', 'float16', [1, 16384], '/xxx/x.bin') \           # 输入数据文件
            .custom_input('y', 'float16', [1, 16384], '/xxx/y.bin') \
            .custom_output('x', 'float16', [1, 16384], '/xxxx/z.bin')           # golden数据文件