@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)
 def cleanup():
  be = request.getfuncargvalue('backend_tests')
  del be
 request.addfinalizer(cleanup)
 return be

@ 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 ) def cleanup ( ) : be = request . getfuncargvalue ( 'backend_tests' ) del be request . addfinalizer ( cleanup ) return be
fixture that returns cpu and gpu backends for 16 and 32 bit .