Skip to content

Commit 24a6600

Browse files
committed
Fix mypy error in pytato.loopy regarding get_dependencies arg
1 parent 3f90cbd commit 24a6600

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pytato/loopy.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,7 @@ def extend_bindings_with_shape_inference(knl: lp.LoopKernel,
418418
from loopy.kernel.array import ArrayBase
419419
from loopy.symbolic import get_dependencies as lpy_get_deps
420420
from pymbolic.mapper.substitutor import make_subst_func
421+
from pymbolic.primitives import is_valid_operand
421422

422423
from pytato.transform import SizeParamGatherer
423424

@@ -426,8 +427,9 @@ def extend_bindings_with_shape_inference(knl: lp.LoopKernel,
426427
lp_size_params: frozenset[str] = reduce(frozenset.union,
427428
(lpy_get_deps(not_none(arg.shape))
428429
for arg in knl.args
429-
if isinstance(arg, ArrayBase)),
430-
frozenset())
430+
if isinstance(arg, ArrayBase)
431+
and is_valid_operand(arg.shape)
432+
), frozenset())
431433

432434
pt_size_params: frozenset[SizeParam] = reduce(frozenset.union,
433435
(get_size_param_deps(bnd)

0 commit comments

Comments
 (0)