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
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
ConvertArithToRiscvSnitchPass
dataclass
¶
Bases: ModulePass