Print mps
print_mps
MPSTarget
dataclass
Bases: Target
Source code in xdsl/backend/mps/print_mps.py
26 27 28 29 30 31 | |
name = 'mps'
class-attribute
instance-attribute
__init__() -> None
emit(ctx: Context, module: ModuleOp, output: IO[str]) -> None
Source code in xdsl/backend/mps/print_mps.py
30 31 | |
print_to_mps(prog: ModuleOp, output: IO[str]) -> None
Lower an MLIR module to the proprietary Air Intermediate Representation (AIR).
This function emits the AIR bitcode required to target Apple GPUs directly, bypassing the Metal Shading Language source generation step.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
prog
|
ModuleOp
|
The MLIR ModuleOp to be lowered. |
required |
output
|
IO[str]
|
The IO stream (e.g., stdout or a file) to write the generated bitcode to. |
required |
Returns:
| Type | Description |
|---|---|
None
|
None. The output is written directly to the provided stream. |
Source code in xdsl/backend/mps/print_mps.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | |