qat.experimental.dialect.pulse.analysis.locate_kernels module

Contains analysis to locate all KernelOp operations and their call sites in a module.

class KernelCallSites(symbol_name, operation, call_sites)

Bases: object

Stores a KernelOp operation found in a module, and each of its call sites.

Variables:
  • symbol_name – The name of the Kernel.

  • operation – The Kernel operation.

  • call_sites – A sequence of operations that invoke the Kernel.

call_sites: tuple[CallKernelOp, ...]
operation: KernelOp
symbol_name: str
locate_kernels(op)

Walks op and returns a KernelCallSites for every KernelOp found, pairing each kernel with all CallKernelOp instances that reference it.

Parameters:

op (Operation) – The root operation to walk.

Return type:

tuple[KernelCallSites, ...]

Returns:

One KernelCallSites per KernelOp, in walk order.