def benchmark_synthetic(bs, nreps):
    ibuf = pynq.allocate((bs, 3, 224, 224), dtype=np.int8, target=ol.bank0)
    obuf = pynq.allocate((bs, 5), dtype=np.uint32, target=ol.bank0)
    pwr_rec = setup_power_recording()
    pwr_rec.record(0.1)
    total_duration = time.monotonic()
    for i in range(nreps):
        accelerator.call(ibuf, obuf, fcbuf, bs)
    total_duration = (time.monotonic() - total_duration)
    pwr_rec.stop()
    latency = (total_duration / nreps)
    fps = int(((nreps / total_duration) * bs))
    f = pwr_rec.frame
    powers = pd.DataFrame(index=f.index)
    powers['board_power'] = (f['12v_aux_power'] + f['12v_pex_power'])
    powers['fpga_power'] = f['vccint_power']
    return (fps, latency, powers)
def benchmark_synthetic(bs, nreps):
    ibuf = pynq.allocate((bs, 3, 224, 224), dtype=np.int8, target=ol.bank0)
    obuf = pynq.allocate((bs, 5), dtype=np.uint32, target=ol.bank0)
    pwr_rec = setup_power_recording()
    pwr_rec.record(0.1)
    total_duration = time.monotonic()
    for i in range(nreps):
        accelerator.call(ibuf, obuf, fcbuf, bs)
    total_duration = (time.monotonic() - total_duration)
    pwr_rec.stop()
    latency = (total_duration / nreps)
    fps = int(((nreps / total_duration) * bs))
    f = pwr_rec.frame
    powers = pd.DataFrame(index=f.index)
    powers['board_power'] = (f['12v_aux_power'] + f['12v_pex_power'])
    powers['fpga_power'] = f['vccint_power']
    return (fps, latency, powers)