Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
context = arbor.context(threads=4, gpu_id=None)
print(context)
meters = arbor.meter_manager()
meters.start(context)
recipe = ring_recipe(10)
print(f'{recipe}')
meters.checkpoint('recipe-create', context)
decomp = arbor.partition_load_balance(recipe, context)
print(f'{decomp}')
hint = arbor.partition_hint()
hint.prefer_gpu = True
hint.gpu_group_size = 1000
print(f'{hint}')
hints = dict([(arbor.cell_kind.cable, hint)])
decomp = arbor.partition_load_balance(recipe, context, hints)
print(f'{decomp}')
meters.checkpoint('load-balance', context)
sim = arbor.simulation(recipe, decomp, context)
meters.checkpoint('simulation-init', context)
spike_recorder = arbor.attach_spike_recorder(sim)