pystencils.flow.operator.Operator#
- class pystencils.flow.operator.Operator(graph, *, ispace=None, config=None)#
- Parameters:
graph (FlowgraphNode | Flowgraph)
ispace (PatchSlice | None)
config (CreateKernelConfig | None)
- property func: KernelWrapper | None#
Executable kernel function of this operator
- property gpu_launch_config: GpuLaunchConfiguration | None#
Access this operator’s GPU launch configuration.
- Raises:
AttributeError – If the operator’s code was not compiled yet, the launch config is inaccesible.
- Returns:
The launch configuration object, or
Noneif the kernel was not compiled for GPU.
- generate_code()#
Generate the intermediate representation of this operator’s code.
- Raises:
RuntimeError – If code was already generated
- clear()#
Clear the generated IR and compiled module, if present.
- compile_code()#
Compile this operator’s executable module.
Internally calls
generate_codeif code was not already generated.- Raises:
RuntimeError – If the code was already compiled
- clear_compiled_code()#
Clear the compiled code module. Does nothing if no compiled module is attached.