Ejemplo n.º 1
0
def test(request, silent=True):
    veriloggen.reset()

    simtype = request.config.getoption('--sim')

    rslt = onnx_resnet18.run(
        act_dtype,
        weight_dtype,
        bias_dtype,
        scale_dtype,
        with_batchnorm,
        disable_fusion,
        conv2d_par_ich,
        conv2d_par_och,
        conv2d_par_col,
        conv2d_par_row,
        conv2d_concur_och,
        conv2d_stationary,
        pool_par,
        elem_par,
        chunk_size,
        axi_datawidth,
        silent,
        filename=None,
        simtype=simtype,
        outputfile=os.path.splitext(os.path.basename(__file__))[0] + '.out')

    verify_rslt = rslt.splitlines()[-1]
    assert (verify_rslt == '# verify: PASSED')
Ejemplo n.º 2
0
        filename=None,
        simtype=simtype,
        outputfile=os.path.splitext(os.path.basename(__file__))[0] + '.out')

    verify_rslt = rslt.splitlines()[-1]
    assert (verify_rslt == '# verify: PASSED')


if __name__ == '__main__':
    rslt = onnx_resnet18.run(
        act_dtype,
        weight_dtype,
        bias_dtype,
        scale_dtype,
        with_batchnorm,
        disable_fusion,
        conv2d_par_ich,
        conv2d_par_och,
        conv2d_par_col,
        conv2d_par_row,
        conv2d_concur_och,
        conv2d_stationary,
        pool_par,
        elem_par,
        chunk_size,
        axi_datawidth,
        silent=False,
        filename='tmp.v',
        outputfile=os.path.splitext(os.path.basename(__file__))[0] + '.out')
    print(rslt)