David Mak
c849f1884d
[core] codegen: implement ndarray iterator NDIter
...
Based on 50f960ab: core/ndstrides: implement ndarray iterator NDIter
A necessary utility to iterate through all elements in a possibly
strided ndarray.
2024-11-29 12:15:19 +08:00
David Mak
f9378e7c93
[core] codegen: WIP - Implement ContiguousNDArray
...
Fixes compatibility with linalg algorithms.
2024-11-29 12:15:19 +08:00
David Mak
5fb1870fea
[core] codegen: Implement NDArray functions from a0a1f35b
2024-11-29 12:15:19 +08:00
David Mak
fff7b597ec
[core] codegen/irrt: Add IRRT functions for strided-ndarray
2024-11-29 12:15:19 +08:00
David Mak
63a036bf08
[core] Add itemsize and strides to NDArray struct
...
Temporarily disable linalg ndarray tests as they are not ported to work
with strided-ndarray.
2024-11-29 12:15:19 +08:00
David Mak
2c6cd9d3eb
[core] codegen: Add helper functions for create+call functions
...
Replacement for various FnCall methods from legacy ndstrides
implementation.
2024-11-29 12:15:19 +08:00
David Mak
cf82332977
[core] codegen: Add call_memcpy_generic_array
...
Replacement for Instance<Ptr>::copy_from from legacy ndstrides
implementation.
2024-11-29 12:15:19 +08:00
David Mak
05239c8066
[core] Add type_aligned_alloca
2024-11-29 12:15:19 +08:00
David Mak
652ed51bc6
[core] codegen/types: Add docs for NDArrayType::fields
2024-11-29 12:15:19 +08:00
David Mak
e1f34e9fe1
[core] Expose irrt::ndarray
2024-11-29 12:15:19 +08:00
David Mak
5a08736b51
[core] codegen/ndarray: Cleanup
...
- Remove redundant size param
- Add *_field functions
2024-11-29 12:15:19 +08:00
David Mak
6732111430
[core] Move alloca and map_value of ProxyType to implementations
...
These functions may not be invokable by the same set of parameters as
some classes has associated states.
2024-11-29 12:15:19 +08:00
David Mak
ec498783f7
[core] codegen/types: Rename StructField::set_from_value
2024-11-29 12:15:19 +08:00
David Mak
96c2446597
[standalone] linalg: Fix function name in error message
2024-11-29 12:15:19 +08:00
David Mak
5d0d0297d1
[core] codegen: Move ndarray type/value as a separate module
2024-11-29 12:15:19 +08:00
occheung
015714eee1
copy constructor -> clone
2024-11-28 18:52:53 +08:00
occheung
71dec251e3
ld/dwarf: remove reader resets
...
DWARF reader never had to reverse. Readers are already copied to achieve this effect.
Plus the position that it reverses to might be questionable.
2024-11-28 18:52:53 +08:00
occheung
fce61f7b8c
ld: fix dwarf sections offset calculations
2024-11-28 18:52:53 +08:00
abdul124
babc081dbd
core/toplevel: update tests
2024-11-27 14:31:57 +08:00
abdul124
5337dbe23b
core/toplevel: add python-like error messages for class definition
2024-11-27 14:31:57 +08:00
abdul124
f862c01412
core/toplevel: refactor composer
2024-11-27 14:31:53 +08:00
David Mak
0c9705f5f1
[meta] Apply clippy changes
2024-11-25 16:05:12 +08:00
David Mak
5f940f86d9
[artiq] Fix obtaining ndarray struct from NDArrayType
2024-11-25 15:01:39 +08:00
Sebastien Bourdeauducq
5651e00688
flake: add platformdirs artiq dependency
2024-11-22 20:30:30 +08:00
Sebastien Bourdeauducq
f6745b987f
bump sipyco and artiq used for profiling
2024-11-22 19:43:03 +08:00
mwojcik
e0dedc6580
nac3artiq: support kernels sent by content
2024-11-22 19:38:52 +08:00
David Mak
28f574282c
[core_derive] Ignore doctest in example
...
Causes linker errors for unknown reasons.
2024-11-22 00:00:05 +08:00
David Mak
144f0922db
[core] coregen/types: Implement StructFields for NDArray
...
Also rename some fields to better align with their naming in numpy.
2024-11-21 14:27:00 +08:00
David Mak
c58ce9c3a9
[core] codegen/types: Implement NDArray in terms of i8*
...
Better aligns with the future implementation of ndstrides.
2024-11-21 14:27:00 +08:00
David Mak
f7e296da53
[core] irrt: Break IRRT into several impl files
...
Each IRRT file is now mapped to one Rust file.
2024-11-21 14:27:00 +08:00
David Mak
b58c99369e
[core] irrt: Update some IRRT implementation
...
- Change CSlice to use `void*` for better pointer compatibility
- Only include impl *.hpp files in irrt.cpp
- Refactor typedef to using declaration
- Add missing ``// namespace`
2024-11-21 14:26:58 +08:00
David Mak
1a535db558
[core] codegen: Add dtype to NDArrayType
...
We won't have this once NDArray is refactored to strided impl.
2024-11-20 15:35:57 +08:00
David Mak
1ba2e287a6
[core] codegen: Add Self::llvm_type to all type abstractions
2024-11-20 15:35:57 +08:00
lyken
f95f979ad3
core/irrt: fix exception.hpp C++ castings
2024-11-20 15:35:57 +08:00
lyken
48e2148c0f
core/toplevel/helper: add {extract,create}_ndims
2024-11-20 15:35:57 +08:00
David Mak
88e57f7120
[core_derive] Initial implementation
2024-11-20 15:35:55 +08:00
David Mak
d7633c42bc
[core] codegen/types: Implement StructField{,s}
...
Loosely based on FieldTraversal by lyken.
2024-11-19 13:46:25 +08:00
David Mak
a4f53b6e6b
[core] codegen: Refactor ProxyType and ProxyValue
...
Accepts generator+context object for generic type checking. Also
implements more default trait impl for easier delegation.
2024-11-19 13:46:25 +08:00
David Mak
9d9ead211e
[core] Move Proxies to their own modules
2024-11-19 13:46:23 +08:00
David Mak
26a1b85206
[core] codegen/classes: Remove Underlying type
...
This is confusing and we want a better abstraction than this.
2024-11-19 13:45:55 +08:00
David Mak
2822074b2d
[meta] Cleanup from upgrading Rust version
...
- Remove rust_2024_edition warnings, since it wouldn't be released for
another 3 months
- Fix new clippy warnings
2024-11-19 13:43:57 +08:00
David Mak
fe67ed076c
[meta] Update pre-commit configuration
2024-11-19 13:20:27 +08:00
David Mak
94e2414df0
[meta] Update cargo dependencies
2024-11-19 13:20:26 +08:00
Sebastien Bourdeauducq
2cee760404
turn rust_2024_compatibility lints into warnings
2024-11-16 13:41:49 +08:00
Sebastien Bourdeauducq
230982dc84
update dependencies
2024-11-16 12:40:11 +08:00
occheung
2bd3f63991
boolop: terminate both branches with *_end_bb
2024-11-16 12:06:20 +08:00
occheung
b53266e9e6
artiq: use async RPC for attributes writeback
2024-11-12 12:04:01 +08:00
occheung
86eb22bbf3
artiq: main is always the last module
2024-11-12 12:03:38 +08:00
occheung
beaa38047d
artiq: suppress main module debug warning
2024-11-12 12:03:08 +08:00
occheung
705dc4ff1c
artiq: lump return value into attributes writeback RPC
2024-11-12 12:02:35 +08:00