4 ms·
If it is all one language you can have very nice code-sharing. Imagine a function that takes some matrices and does some operation on them. If you now want to e
by WanderPanda 5y ago
If it is all one language you can have very nice code-sharing. Imagine a function that takes some matrices and does some operation on them. If you now want to execute this function on a GPU you can just swapt the matrix type to GPU matrices and as long as you implement kernels for all the operators the function uses the function can be executed on the GPU without any modification. This modularity removes the requirement for each package that wants to use GPUs to recreate and ship their own numpy-like implementation (like Tensorflow, PyTorch etc.).