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

Subarray ref with sep tags not supported. #732

Open
isuruf opened this issue Jan 12, 2023 · 0 comments
Open

Subarray ref with sep tags not supported. #732

isuruf opened this issue Jan 12, 2023 · 0 comments

Comments

@isuruf
Copy link
Collaborator

isuruf commented Jan 12, 2023

For eg following code fails with AttributeError: 'SeparateArrayArrayDimTag' object has no attribute 'stride'

import loopy as lp
import numpy as np
child_knl = lp.make_function(
        [],
        """
        g[0] = 2*e[0] + 3*f[0]
        g[1] = 2*e[1] + 3*f[1]
        """, name="linear_combo")
parent_knl = lp.make_kernel(
        ["{[j]:0<=j<n}", "{[i]:0<=i<n}"],
        """
        [i]: z[i, j] = linear_combo([i]: x[i, j], [i]: y[i,j])
        """,
        kernel_data=[
            lp.GlobalArg(
                name="x, y, z",
                dtype=np.float64,
                dim_tags="sep,C",
                shape=("n", "n")),
            ...],
        fixed_parameters={"n": 10},
        )
knl = lp.merge([parent_knl, child_knl])
knl = lp.inline_callable_kernel(knl, "linear_combo")
print(lp.generate_code_v2(knl).device_code())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant