Convert arith to riscv snitch
convert_arith_to_riscv_snitch
lower_arith_addf = LowerBinaryFloatVectorOp(arith.AddfOp, riscv.FAddDOp, riscv_snitch.VFAddSOp, riscv_snitch.VFAddHOp)
module-attribute
lower_arith_subf = LowerBinaryFloatVectorOp(arith.SubfOp, riscv.FSubDOp, riscv_snitch.VFSubSOp, riscv_snitch.VFSubHOp)
module-attribute
lower_arith_mulf = LowerBinaryFloatVectorOp(arith.MulfOp, riscv.FMulDOp, riscv_snitch.VFMulSOp, riscv_snitch.VFMulHOp)
module-attribute
LowerBinaryFloatVectorOp
dataclass
Bases: RewritePattern
Source code in xdsl/backend/riscv/lowering/convert_arith_to_riscv_snitch.py
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | |
arith_op_cls: type[arith.FloatingPointLikeBinaryOperation]
instance-attribute
riscv_d_op_cls: type[riscv.RdRsRsFloatOperationWithFastMath]
instance-attribute
riscv_snitch_v_f32_op_cls: type[riscv.RdRsRsFloatOperationWithFastMath]
instance-attribute
riscv_snitch_v_f16_op_cls: type[riscv.RdRsRsFloatOperationWithFastMath]
instance-attribute
__init__(arith_op_cls: type[arith.FloatingPointLikeBinaryOperation], riscv_d_op_cls: type[riscv.RdRsRsFloatOperationWithFastMath], riscv_snitch_v_f32_op_cls: type[riscv.RdRsRsFloatOperationWithFastMath], riscv_snitch_v_f16_op_cls: type[riscv.RdRsRsFloatOperationWithFastMath]) -> None
match_and_rewrite(op: Operation, rewriter: PatternRewriter) -> None
Source code in xdsl/backend/riscv/lowering/convert_arith_to_riscv_snitch.py
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | |
ConvertArithToRiscvSnitchPass
dataclass
Bases: ModulePass
Source code in xdsl/backend/riscv/lowering/convert_arith_to_riscv_snitch.py
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 | |
name = 'convert-arith-to-riscv-snitch'
class-attribute
instance-attribute
apply(ctx: Context, op: ModuleOp) -> None
Source code in xdsl/backend/riscv/lowering/convert_arith_to_riscv_snitch.py
90 91 92 93 94 95 96 97 98 99 100 101 | |