-
Notifications
You must be signed in to change notification settings - Fork 202
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
kernel/ksupport: add linalg functions #2527
base: nac3
Are you sure you want to change the base?
Conversation
artiq/firmware/ksupport/api.rs
Outdated
@@ -117,6 +117,19 @@ static mut API: &'static [(&'static str, *const ())] = &[ | |||
api!(y1), | |||
api!(yn), | |||
|
|||
// linalg | |||
api!(np_linalg_matmul = ::linalg::np_linalg_matmul), |
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.
Again I don't think a firmware call and Rust crate are necessary for a couple for
loops with a few additions and multiplications in them.
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.
Also this is already implemented via the @
operator so AFAICT you can just remove this entirely.
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.
Also this is already implemented via the
@
operator so AFAICT you can just remove this entirely.
Should I also remove np_linalg_det
as that too can be implemented in a straight-forward manner.
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 determinant isn't that straightforward and there are a bunch of different algorithm? Maybe using the same crate that does the other operations is fine here.
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.
Updated.
0795195
to
4e37ac4
Compare
Is this tested? I don't think this is going to work without adding nalgebra to cargo. |
ARTIQ Pull Request
Description of Changes
Adds runtime implementation of
np.linalg
/sp.linalg
functions (M-Labs/nac3#478 and M-Labs/artiq-zynq#309)Depends on #2526
Related Issue
Type of Changes
Steps (Choose relevant, delete irrelevant before submitting)
All Pull Requests
Code Changes
flake8
to check code style (follow PEP-8 style).flake8
has issues with parsing Migen/gateware code, ignore as necessary.Licensing
See copyright & licensing for more info.
ARTIQ files that do not contain a license header are copyrighted by M-Labs Limited and are licensed under LGPLv3+.