diff --git a/loopy/check.py b/loopy/check.py index bd9609d1d4b3f2865a86eeffc5f4cc0c1f98eeab..a71bad222d156df95143276eb0d3bde22dc39260 100644 --- a/loopy/check.py +++ b/loopy/check.py @@ -406,7 +406,8 @@ def check_that_shapes_and_strides_are_arguments(kernel): for dim_tag in arg.dim_tags: if isinstance(dim_tag, FixedStrideArrayDimTag): - assert dim_tag.stride is not lp.auto + if dim_tag.stride is lp.auto: + continue deps = get_dependencies(dim_tag.stride) if not deps <= integer_arg_names: diff --git a/loopy/compiled.py b/loopy/compiled.py index 28026b8610173c343f52ac1d4b78f764d4cb94a6..5fb7154d7b7b60f438d6dc6e411f4bd532e7944b 100644 --- a/loopy/compiled.py +++ b/loopy/compiled.py @@ -668,6 +668,7 @@ class CompiledKernel: for name in iflags.split(","): iflags_args[name] = True iflags = InvocationFlags(**iflags_args) + print iflags_args elif not isinstance(iflags, InvocationFlags): iflags = InvocationFlags(**iflags) diff --git a/test/test_loopy.py b/test/test_loopy.py index 0efcaab050d6ce0fc2b6eb95c0a52517b82f9b64..f58c93787b9192087ccc8613bba4e50b53966b51 100644 --- a/test/test_loopy.py +++ b/test/test_loopy.py @@ -1213,6 +1213,8 @@ def test_dependent_domain_insn_iname_finding(ctx_factory): [ lp.GlobalArg("box_source_starts,box_source_counts_nonchild", None, shape=None), + lp.GlobalArg("strengths", + None, shape="nsources"), "..."]) print knl @@ -1224,6 +1226,7 @@ def test_dependent_domain_insn_iname_finding(ctx_factory): box_source_starts=np.int32, box_source_counts_nonchild=np.int32, strengths=np.float64, + nsources=np.int32, ))