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

Use air dialect bindings for test, add xrt wrapper #581

Merged
merged 2 commits into from
May 16, 2024

Conversation

fifield
Copy link
Collaborator

@fifield fifield commented May 16, 2024

  • Rewrite test xrt/02 python to generate air dialect directly instead of using linalg + tiling

  • Add simple compile and load utility for xrt in the style of the python air cpu and air runtime backends, where compile wraps aiecc, and load wraps xrt and copies buffers:

    import air.backend.xrt as xrt_backend
    backend = xrt_backend.XRTBackend()
    with filelock.FileLock("/tmp/npu.lock"):
        mul = backend.compile_and_load(mlir_module)
        # run the kernel and sync the buffers in both directions
        (_, _, output_c) = mul(input_a, input_b, input_c)

@fifield fifield merged commit 4cd43b0 into Xilinx:main May 16, 2024
11 checks passed
@fifield fifield deleted the xrt_py branch May 16, 2024 22:20
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

Successfully merging this pull request may close these issues.

1 participant