Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pip prod(deps): bump pyright from 1.1.393 to 1.1.394 #3894

Merged
merged 3 commits into from
Feb 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ dev = [
"nbconvert>=7.7.2,<8.0.0",
"textual-dev==1.7.0",
"pytest-asyncio==0.25.3",
"pyright==1.1.393",
"pyright==1.1.394",
"sympy==1.13.3",
]
docs = [
Expand Down
8 changes: 4 additions & 4 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions xdsl/backend/riscv/prologue_epilogue_insertion.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from xdsl.context import MLContext
from xdsl.dialects import builtin, riscv, riscv_func
from xdsl.dialects.riscv import (
FloatRegisterType,
IntRegisterType,
Registers,
RISCVRegisterType,
Expand Down Expand Up @@ -39,6 +40,7 @@ def _process_function(self, func: riscv_func.FuncOp) -> None:
for op in func.walk()
if not isinstance(op, riscv.GetRegisterOp | riscv.GetFloatRegisterOp)
for res in op.results
if isinstance(res.type, IntRegisterType | FloatRegisterType)
if res.type in Registers.S or res.type in Registers.FS
)

Expand Down
4 changes: 2 additions & 2 deletions xdsl/backend/riscv/riscv_register_queue.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def exclude_register(self, reg: IntRegisterType | FloatRegisterType) -> None:
"""
Removes register from available set, if present.
"""
if reg in self.available_int_registers:
if isinstance(reg, IntRegisterType) and reg in self.available_int_registers:
self.available_int_registers.remove(reg)
if reg in self.available_float_registers:
if isinstance(reg, FloatRegisterType) and reg in self.available_float_registers:
self.available_float_registers.remove(reg)
6 changes: 4 additions & 2 deletions xdsl/transforms/convert_stencil_to_csl_stencil.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,15 +302,17 @@ def split_ops(
rem.remove(use.operation)

# find constants in `a` needed outside of `a`
cnst_exports = [cnst for cnst in a_exports if isinstance(cnst, arith.ConstantOp)]
cnst_exports = tuple(
cnst for cnst in a_exports if isinstance(cnst, arith.ConstantOp)
)

# `a` exports one value plus any number of constants - duplicate exported constants and return op split
if len(a_exports) == 1 + len(cnst_exports):
recv_chunk_ops, done_exch_ops = list[Operation](), list[Operation]()
for op in ops:
if op in a:
recv_chunk_ops.append(op)
if op in cnst_exports:
if op in cnst_exports and isinstance(op, arith.ConstantOp):
# create a copy of the constant in the second region
done_exch_ops.append(cln := op.clone())
# rewire ops of the second region to use the copied constant
Expand Down
7 changes: 3 additions & 4 deletions xdsl/transforms/lower_csl_stencil.py
Original file line number Diff line number Diff line change
Expand Up @@ -503,10 +503,9 @@ def match_and_rewrite(self, op: csl_stencil.ApplyOp, rewriter: PatternRewriter,
rewriter.erase_op(e, safe_erase=False)

# housekeeping: this strategy requires zeroing out the accumulator iff the apply is inside a loop
assert (elem_t := accumulator.type.get_element_type()) in [
Float16Type(),
Float32Type(),
]
assert isinstance(
(elem_t := accumulator.type.get_element_type()), Float16Type | Float32Type
)
zero = arith.ConstantOp(FloatAttr(0.0, elem_t))
mov_op = csl.FmovsOp if elem_t == Float32Type() else csl.FmovhOp
rewriter.insert_op(
Expand Down
Loading