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

Pynq-fud integration #1120

Merged
merged 17 commits into from
Jul 21, 2022
Merged

Pynq-fud integration #1120

merged 17 commits into from
Jul 21, 2022

Conversation

nathanielnrn
Copy link
Contributor

@nathanielnrn nathanielnrn commented Jul 20, 2022

This PR can close #1114.
A new pynq-fud-script can take in arbitrary data, run a kernel on it, and output the relevant memories. Integrates into fud e foo.xclbin --from xclbin --to fpga ... commands.

This replaces the old OpenCL way of running a kernel that fud used to use.

Unfortunately this does not address #1037 #872 #856.

nathanielnrn and others added 11 commits July 19, 2022 16:04
Previously, fud-pynq-script accepted a mapping and returned a string,
now ittakes a path to an xclbin file and returns a dictionary conforming
to json standards.

The new execution.py retains all of the previous config settings while
simplifying the kernel execution by running fud-pynq-script.
execution.py is responsible for turning the script's output into a json
file
Comment on lines 38 to 45
def import_libs():
"""Import optional libraries"""
try:
import pyopencl as cl # type: ignore

self.cl = cl
except ImportError:
raise errors.RemoteLibsNotInstalled
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wasn't sure about this, should the pynq import from pyproject.toml go here instead?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reason this is inside a try-catch inside a function is because the fpga dependencies are not installed by default. The program only throws an error if you try to run the xilinx stage without installing the fpga dependencies in the flit configuration.

I would recommend moving the

from fud.stages.xilinx import fud_pynq_script

and using a self.pynq_script field to access it instead of importing it on the top which will cause errors for default fud installations

@nathanielnrn nathanielnrn requested a review from rachitnigam July 20, 2022 22:57
fud/pyproject.toml Outdated Show resolved Hide resolved
Copy link
Contributor

@rachitnigam rachitnigam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good! Address the comments about dependency to make sure that a fresh, default install of fud, when following these instructions does not break.

Once done, merge at your discretion

@nathanielnrn nathanielnrn merged commit aef6cd4 into master Jul 21, 2022
@nathanielnrn nathanielnrn deleted the pynq-fud-integration branch July 21, 2022 15:22
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.

Integrate PYNQ into fud stage
2 participants