pyjuice.transformations.bump_block_size

pyjuice.transformations.bump_block_size(ns: CircuitNodes, block_size: int, use_cuda: bool = True)

Return a copy of a node group whose block size is increased to block_size (which must be a multiple of the current block size and divide the number of nodes), re-packing its parameters and edges accordingly. Larger block sizes make better use of the GPU; see also blockify(), which chooses and applies block sizes across a whole PC.

Parameters:
  • ns (CircuitNodes) – the node group whose block size is increased

  • block_size (int) – the target block size; must be greater than ns.block_size

  • use_cuda (bool) – whether to perform the re-packing on the GPU

Returns:

a new node group with the larger block size

Return type:

CircuitNodes