I legit think that even if you are using say pytorch. You are better off writing your code in julia and using the python interop.
I legit think that even if you are using say pytorch. You are better off writing your code in julia and using the python interop.
Though I much prefer Flux.jl
In other more complex cases beyond big fat matmuls and such, it's much faster, even comparing to torchscript (sciml, neural ODEs etc).
Still, the codegen is getting there with the funded work on the GPU compiler and memory allocation and there eventually won't be any sort of tradeoff.
In the meantime, Yes, there is a package at allows calling pytorch kernels without modifying your code. This is also only possible with such finesse due to Julia's power and composability. See here for the package: https://fluxml.ai/2020/06/29/acclerating-flux-torch.html
https://github.com/FluxML/Torch.jl https://fluxml.ai/2020/06/29/acclerating-flux-torch.html
Also the gap between native GPU codegen in Julia and the hand-optimized kernels in PyTorch is lesser than you'd imagine.
In fact, see this talk at JuliaCon, which compares Julia on a 1000 GPUs against a CUDA/C implementation, and finds them to be extremely close.
https://www.youtube.com/watch?v=vPsfZUqI4_0 https://github.com/eth-cscs/ImplicitGlobalGrid.jl
However, we are integrating a lot of the underlying infrastructure to the point that both Knet and Flux will only differ in API approach.
[1] https://gist.github.com/ChrisRackauckas/cc6ac746e2dfd285c28e... [2] https://gist.github.com/ChrisRackauckas/4a4d526c15cc4170ce37...
I think the ecosystem could be a bit better, but that's more of a personal opinion rather than a serious concern as, like you alluded to, you the interop story is insanely good.
TimeArray is like a DataFrame, but with a lot less features. You can't really do that much with them, and they only have limited support in an auxiliary package for resampling.
It would be nice if a new DataFrame library could be created that was inspired by Pandas.
In general, I think Julia suffers from the problem of too many small packages. For example, there's 3 libraries I have to use for time series: TimeSeries.jl, TimeSeries Resample.jl,and TimeSeriesIO.jl. None of the libraries are particularly large and should all be merged into one package.
Part of the reason for the dirth of small packages is because, unlike Python, Julia's strong support for function polymorphism allows for seamless extension of existing functionality with new packages. Unfortunately, I think this has created a cultural problem in which new packages are created that only slightly modify existing functionality.
It's a pretty good scripting language, and it's a "good enough" interface that implementers of C packages can expose powerful features, and that can only go so far. User's can't easily compose the powerful features that library designers didn't intent.
Julia, on the other hand, was designed for the explicit purpose of high-performance scientific computing, with a syntax informed by the tools people already knew (python, MATLAB). It's no wonder it's so much easier to use.