Open gussmith23 opened 4 years ago
@hypercubestart This one mostly involves taking a look at the ndarray library and using it more efficiently. I don't have a lot of good guidance here; we can talk in more detail later. Basically, this task involves getting to understand the library and how it works, and using it "more correctly" in Glenside. Specifically, avoiding data copies wherever possible!
@hypercubestart Please add your notes on this whenever you can! Would like to document all of the issues we had before we move on to something else.
crossposting from https://github.com/gussmith23/glenside/pull/59:
on hold for now...because of difficulty of getting lifetimes to work out. Ideally, we could use ArrayViews that reference owned arrays already in the hashmap, but Rust lifetimes don't permit this
Thanks, sorry I didn't see that comment!! Many open issues and PRs haha
We use ndarray as our tensor representation, but we don't use it very efficiently. Specifically, we copy data everywhere, for nearly every operation. The ndarray library is smart; it can do many of the operations we need to do without copying data, if only we understood how to use it well. There are also opportunities to contribute back to ndarray, if we find something we'd like to be able to do that they haven't yet implemented. From what little I've dug in their source code already, it seems like these opportunities might be abundant, and contributing shouldn't be too hard!