@pytest.fixture(scope='module', params=list(gpu_cpu_32_16), ids=idfunc)
def backend_tests(request):
    be = gen_backend(backend=request.param[0],
                     datatype=request.param[1],
                     batch_size=128,
                     device_id=request.config.getoption("--device_id"),
                     rng_seed=0)

    # add a cleanup call - will run after all tests in module are done
    def cleanup():
        be = request.getfuncargvalue('backend_tests')
        del be
    request.addfinalizer(cleanup)

    # tests using this fixture can access the backend object from
    # backend or use the NervanaObject.be global
    return be
Fixture that returns cpu and gpu backends for 16 and 32 bit
dataset/ETHPy150Open NervanaSystems/neon/conftest.py/backend_tests