xnn.common.cpu_kernels.prepare#
- xnn.common.cpu_kernels.prepare(kernel, grid, *args, balance=None, **meta)[source]#
The launch
kernel[grid](*args, **meta)on CPU tensors, compiled and packed, to be called once or many times (gridan int or a 1-tuple;num_warpsandnum_stagesare ignored).balancean int64 prefix(n_programs + 1,)of the programs’ work (a compressed-row pointer): each thread takes contiguous programs of an equal share of it, instead of chunks taken as threads finish.