Ejemplo n.º 1
0
def test_compression_overlapped():
    result = run_notebook(
        'data_compression/overlapping-communication-compute.ipynb',
        NOTEBOOK_PATH)
    assert result._8
    base_time = get_timeit_time(result, 9)
    overlapped_time = get_timeit_time(result, 15)
    assert overlapped_time < base_time
Ejemplo n.º 2
0
def test_streams_memories():
    result = run_notebook('2_kernel_optimization/3-memories-and-streams.ipynb',
                          NOTEBOOK_PATH)
    assert result._2 == result._4
    assert result._2 == result._8
    assert result._3 == result._6
    assert result._2 + 4 * 1024 * 1024 == result._3
    assert result._9 == 'krnl_stream_vadd_1.out_r'
    assert result._10 is not None
Ejemplo n.º 3
0
def test_using_streams():
    result = run_notebook('2_kernel_optimization/2-using-streams.ipynb',
                          NOTEBOOK_PATH)
    assert result._10 is True
Ejemplo n.º 4
0
def test_kernel_opt():
    result = run_notebook('2_kernel_optimization/1-kernel-optimizations.ipynb',
                          NOTEBOOK_PATH)
    assert result._5 is True
    assert result._15 is True
    assert result._18 is True
Ejemplo n.º 5
0
def test_intro_opencl():
    result = run_notebook('1_introduction/4-opencl-comparison.ipynb',
                          NOTEBOOK_PATH)
Ejemplo n.º 6
0
def test_intro_explore():
    result = run_notebook('1_introduction/3-exploring-a-bitstream.ipynb',
                          NOTEBOOK_PATH)
Ejemplo n.º 7
0
def test_intro_add_mult():
    result = run_notebook('1_introduction/2-vadd-and-vmult.ipynb',
                          NOTEBOOK_PATH)
    # TODO: add stdout compare for first cell
    assert result._7 is True  # First compare
    assert get_stdout(result, 1) == 'SUCCESS!\n'
Ejemplo n.º 8
0
def test_intro_add():
    result = run_notebook('1_introduction/1-vector-addition.ipynb',
                          NOTEBOOK_PATH)
    # TODO: add stdout compare for first cell
    assert result._7 is True  # First compare
    assert get_stdout(result, 1) == 'SUCCESS!\n'
Ejemplo n.º 9
0
def test_welcome():
    # No cell outputs to verify
    result = run_notebook('0_welcome_to_pynq/welcome-to-pynq.ipynb',
                          NOTEBOOK_PATH)
Ejemplo n.º 10
0
def test_compression_zlib():
    result = run_notebook('data_compression/zlib-compression.ipynb',
                          NOTEBOOK_PATH)
    assert result._20
    hw_time = get_timeit_time(result, 23)
    sw_time = get_timeit_time(result, 24)
Ejemplo n.º 11
0
def test_compression_intro():
    result = run_notebook('data_compression/intro-to-compression.ipynb',
                          NOTEBOOK_PATH)
    assert result._12
    assert result._13 < 1
Ejemplo n.º 12
0
def test_scheduling():
    result = run_notebook(
        '3_advanced_features/1-efficient-accelerator-scheduling.ipynb',
        NOTEBOOK_PATH)
    assert result._5 is True
    assert result._11 is True