-
Notifications
You must be signed in to change notification settings - Fork 233
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
add xclbin URI support #1140
add xclbin URI support #1140
Conversation
use fsspec to enable xclbin's to be one of any URI protocol supported by the library or an installed add-on
I haven't tested this at all yet but I wanted to get this PR open and share it with others to throw stones. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems pretty good to me so far minus some small nits.
it is the easy and safe thing to do as a first implementation. can revisit FileCache later
I have some more commits that I want to push to this after rebasing on top of the fixed pytests (because they weren't really broken by this stuff) |
I updated the checklist with the remaining tasks for this PR to be ready to merge. |
refactor `localize_xclbin` from the Vitis runner to `util.io.downloadURI()` and add some pytests
('s3',Path("tests/s3_test_download_json.json")), | ||
('file',Path("tests/file_test_download_json.json")), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to add a test for ssh? The simplest way to do it would be to spin up a docker container that the test would try to pull things out of with ssh. If docker isn't installed, the test would be skipped.
Alternately, we write a test for this that utilizes the multiple hosts in CI. Or we could do both so that devs can test this locally (if they have docker installed) and we have a test in CI without having to install docker in the place where we're running pytests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couldn't we just test this by running localhost
for the "it should work" case and some invalid IP for the "it shouldn't work" case? I'm not sure it's worth having docker installed for such a small test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@abejgonzalez how do we differentiate whether someone doesn't have sshd configured correctly on localhost vs the test actually working? I don't like having a dependency into sshd that the tests aren't actually controling the configuration for.
A lighter-weight option could be for a test fixture to spin up a Paramiko sshd on a non-system port or use something like this gist. What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That seems better to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've asked @filipstamenkovic-sifive to help me add a test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Captured in #1167 for followup. I'd like to go ahead and get this merged if the CI passes this time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@timsnyder-siv adding a few suggestions to fix the test issue in CI.
Co-authored-by: Filip Stamenkovic <[email protected]>
awstools.py now depends on it via util.io
Co-authored-by: Abraham Gonzalez <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Pending all CI passing.
Pull request was closed
This reverts commit a517b19.
hwcfg.local_xclbin = './local.xclbin' | ||
|
||
with cd(remote_sim_dir): | ||
run(downloadURI, hwcfg.xclbin, hwcfg.local_xclbin) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From my testing, this line doesn't execute. run() only accepts a string, which is a shell command, not a function. The 2nd and 3rd arguments are booleans, not arguments to the first function. Am I on the wrong version of fabric or something? https://github.com/fabric/fabric/blob/1.14/fabric/operations.py#L970
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that we meant execute()
instead of run()
.
use fsspec to enable xclbin's to be one of any URI protocol
supported by the library or an installed add-on
Related PRs / Issues
UI / API Impact
Enables xclbin in hwdb to be a URI supported by fsspec
Verilog / AGFI Compatibility
No impact to Verilog or AGFI.
Contributor Checklist
changelog:<topic>
label?ssh://
in Add a test for ssh: fsspec URI #1167ci:fpga-deploy
label?Please Backport
label?Reviewer Checklist (only modified by reviewer)
changelog:<topic>
label?