News for hackers. Stuff that matters.
Re:Arraymancer – Deep Learning Nim Library by logicchains on Friday March 29, 2024 @03:50AM (#39861581)
Interesting that it "Supports tensors of up to 6 dimensions". Is it difficult to support an arbitrary number of dimensions, e.g. does Nim lack variadic generics?
Re:Arraymancer – Deep Learning Nim Library by mratsim on Friday March 29, 2024 @03:59AM (#39861624)
Author here,

Nim supports variadic generic, it's an arbitrary limitation so that shape and stride small vectors that describe a tebsor can be stack-allocated and fit in a cacheline.

Edit: it can be configured via a compile-time flag to 8 or 10 or anything: https://github.com/mratsim/Arraymancer/blob/master/src%2Farr...

Re:Arraymancer – Deep Learning Nim Library by jononor on Friday March 29, 2024 @11:43AM (#39865429)
6 dimensions is sufficient for a dataset of 3d hyperspectral video (batch, time, x, y, z, channels). I think it wil cover the vast majority of usecases :D
Re:Arraymancer – Deep Learning Nim Library by mratsim on Saturday March 30, 2024 @03:25AM (#39872629)
That was my reasoning for this "restriction".
Re:Arraymancer – Deep Learning Nim Library by lucidrains on Friday March 29, 2024 @02:12PM (#39867211)
I've never worked with a project with more than 7 dimensions, yet
Re:Arraymancer – Deep Learning Nim Library by mratsim on Saturday March 30, 2024 @03:26AM (#39872632)
What would be the 7 dimensions?
Re:Arraymancer – Deep Learning Nim Library by ElegantBeef on Friday March 29, 2024 @03:59AM (#39861621)
It does not formally have variadics, but since it has tuples you can have pretend variadic generics.