Warning
You are reading a version of the website built against the unstable main branch. This content is liable to change without notice and may be inappropriate for your use case.
You can find the documentation for the current stable release here.
pyop3.compile package¶
Submodules¶
pyop3.compile.context module¶
- class pyop3.compile.context.CodegenContext(*, named_terminal_buffer_intents, propagate_negatives, mask_array_accesses)[source]¶
Bases:
ABCBase class for code generation backends
Class designed solely for use in codegen.py, as an interface to specific backends.
- abstractmethod add_leaf_assignment(assignee, expression, assignment_type, paths, iname_maps, loop_indices)[source]¶
- property arguments¶
- property domains¶
- property instructions¶
- abstractmethod lower_buffer_access(buffer, layouts, iname_maps, loop_indices, *, intent)[source]¶
Determine indexing and lower buffer expression to respective IR
- abstractmethod lower_expr(expr, iname_maps, loop_indices, intent=None, paths=None)[source]¶
Lower a PyOP3 expression to the target’s IR representation.
- Returns:
pymbolic for Loopy
xDSL for MLIR
- property subkernels¶
pyop3.compile.core module¶
pyop3.compile.loopy module¶
- class pyop3.compile.loopy.INVCallable(name=None, arg_id_to_dtype=None, arg_id_to_descr=None, name_in_target=None)[source]¶
Bases:
LACallableThe InverseCallable replaces loopy.CallInstructions to “inverse” functions by LAPACK getri.
- name = 'inverse'¶
- class pyop3.compile.loopy.LACallable(name=None, arg_id_to_dtype=None, arg_id_to_descr=None, name_in_target=None)[source]¶
Bases:
ScalarCallableThe LACallable (Linear algebra callable) replaces loopy.CallInstructions to linear algebra functions like solve or inverse by LAPACK calls.
- abstract property name¶
- class pyop3.compile.loopy.LoopyCodegenContext(**kwargs)[source]¶
Bases:
CodegenContext- add_leaf_assignment(assignee, expression, assignment_type, paths, iname_replace_maps, loop_indices)[source]¶
- add_temporary(prefix='t', dtype=dtype('int32'), *, shape=(), initializer=None, read_only=False)[source]¶
- property arguments¶
- property domains¶
- property instructions¶
- register_extent(obj, *args, **kwargs)[source]¶
- register_extent(num, *args, **kwargs)
- register_extent(expr, inames, loop_indices)
- property subkernels¶
