ahrefs / ocannl

OCANNL: OCaml Compiles Algorithms for Neural Networks Learning
BSD 2-Clause "Simplified" License
67 stars 2 forks source link

Uniform naming convention for `Lazy_array.t`; refactor and possibly rename `Lazy_array.t` #212

Closed lukstafi closed 7 months ago

lukstafi commented 1 year ago

Lazy_array.t have been variously called in the code la, arr, nd, ptr, xhs (generalizing from lhs, rhs). I'm also not sure if Lazy_array is a good name. The so-called hosted array is lazy but only to delay creation till the shape is inferred. But it is also optional (for non-hosted arrays). And the type also stores information enabling a 3-way categorization: hosted, device-only, virtual -- with 3 boolean option flags. This can probably be converted to a variant option -- the optimization code that modifies them might need some refactoring though.

lukstafi commented 7 months ago

Lazy_array is now Tnode (tensor node).