←back to thread

490 points jarmitage | 1 comments | | HN request time: 0.001s | source
Show context
raytopia ◴[] No.40681705[source]
I love how many python to native/gpu code projects there are now. It's nice to see a lot of competition in the space. An alternative to this one could be Taichi Lang [0] it can use your gpu through Vulkan so you don't have to own Nvidia hardware. Numba [1] is another alternative that's very popular. I'm still waiting on a Python project that compiles to pure C (unlike Cython [2] which is hard to port) so you can write homebrew games or other embedded applications.

[0] https://www.taichi-lang.org/

[1] http://numba.pydata.org/

[2] https://cython.readthedocs.io/en/stable/

replies(8): >>40681794 #>>40681883 #>>40681919 #>>40682488 #>>40684037 #>>40685851 #>>40686919 #>>40693004 #
setopt ◴[] No.40681794[source]
CuPy is also great – makes it trivial to port existing numerical code from NumPy/SciPy to CUDA, or to write code than can run either on CPU or on GPU.

I recently saw a 2-3 orders of magnitude speed-up of some physics code when I got a mid-range nVidia card and replaced a few NumPy and SciPy calls with CuPy.

replies(1): >>40681923 #
6gvONxR4sf7o ◴[] No.40681923[source]
Don’t forget JAX! It’s my preferred library for “i want to write numpy but want it to run on gpu/tpu with auto diff etc”
replies(1): >>40683777 #
1. westurner ◴[] No.40683777[source]
From https://news.ycombinator.com/item?id=37686351 :

>> sympy.utilities.lambdify.lambdify() https://github.com/sympy/sympy/blob/a76b02fcd3a8b7f79b3a88df... :

>> """Convert a SymPy expression into a function that allows for fast numeric evaluation""" [e.g. the CPython math module, mpmath, NumPy, SciPy, CuPy, JAX, TensorFlow, SymPy, numexpr,]

sympy#20516: "re-implementation of torch-lambdify" https://github.com/sympy/sympy/pull/20516