additional math operations #64
Labels
No Milestone
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: M-Labs/artiq-zynq#64
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
https://github.com/m-labs/artiq/issues/1485
Contract items:
3.2.16 determinant of a square 2D matrixMissing features and limitations not explicitly mentioned in #1485 that are probably just about necessary for real-world use:
array()
(i.e. assume them to be rectangular)Throw range/domain errors? (log, asin, ... just return NaN in NumPy, but check all)They seem to just generate RuntimeWarnings and return NaN (the latter of which we do already).numpy.full
Nice-to-haves:
{empty, zeros, ones}[_like]
)Tests to add:
numpy.float()
If we want to support faster math operations on slices, maybe we can have a look at NEON optimized math libraries like Ne10 later. SIMD really improves the performance by a lot if we need to perform operations on large arrays.
One problem with the Ne10 library is that it seems to be dead for 2 years. Other libraries seems to target AArch64 instead of Cortex-A devices.
If we have Zynq Ultrascale+ devices at some point, we could use those.
The LLVM autovectorizer should handle array operations quite nicely – we might need to enable a higher optimization level (and possibly switch to a newer LLVM), though.
core_log
will simply log things row by row, i.e. asarray([array([…]), …])
, which is imho acceptable, given how rare that use case will actually be in practice. Just wanted to make sure it doesn't crash and burn. Also covered by the test suite already.@dpn Is there still more to be done here or should we close this issue?
Opened #122, #123, #124, #125 for the remaining features. (These are not on the contract, but potentially quite useful, at least for writing tests.)