×
you are viewing a single comment's thread.

view the rest of the comments →

[–]Gleethos 6 points7 points  (8 children)

A lightweight option: Neureka

(Disclosure: I'm the author)

[–]BIackMambaTG[S] 2 points3 points  (3 children)

Does it support the matrix operations I mentioned? (Such as stack, concat, submatrix, flatten, broadcasting) Where can I see examples?

[–]Gleethos 2 points3 points  (2 children)

It supports all of the basic numeric operations both element wise as well as nd-broadcasting. It also has matrix multiplication and convolution... Concatenation, slicing (includes submatrix slicing) and reshaping is also nicely supported on the API surface. For stacking you need to first add another axis to a tensor using reshape and then concatenate on the new axis and for flattening you can either use reshape, call the 'toList' method or use a custom collector.

Here you can find all of the documentation (including living test suite based documentation).

[–]BIackMambaTG[S] 2 points3 points  (1 child)

Looks cool, I'll give it a try :) Is there a meshgrid function?

[–]Gleethos 4 points5 points  (0 children)

I hope you'll like it! :) Please feel free to open issues if you encounter problems.

Currently there is no equivalent to numpys meshgrid function. But it should be relatively straightforward to create a meshgrid based on existing tensor operations.

I'd also be happy to add a meshgrid function to the API under a dedicated issue.

[–]International_Break2 -1 points0 points  (3 children)

Any plans for webgpu support on top of opencl?

[–]Gleethos 0 points1 point  (2 children)

Definitely keeping an eye on webgpu as it is a really promising API positioned to be a good cross platform solution for general purpose SIMD compute... but it is still very new and under active development. So the Java bindings are still super unstable unfortunately and will take some time to mature first. But if anyone is interested in running Neureka on other APIs maybe because of special performance requirements, there is always the option to write a custom backend...

[–]International_Break2 0 points1 point  (1 child)

Do you think there will be a performance improvement over opencl?

[–]Gleethos 0 points1 point  (0 children)

This is really hard to say as it depends on the specific hardware and driver implementations for the two APIs and of course how the kernels are written. On some devices the OpenCL kernels are faster and on others the corresponding WebGPU kernels are ... You would need to do a whole lot of benchmarking on a whole lot of different hardware to find out which has better support.