HNHacker News
TopNewBestAskShowJobs

amkkma

769 karma · joined August 4, 2020

submissionscomments
amkkma··on Correctness and composability bugs in the Julia ecosystem
Glad to hear it's being worked on!

> That said, I don't think we can be faulted for that one, because I don't think anybody really has a good answer to this particular design problem.

Agreed! To be clear, If there's any implication of "fault" it was certainly not in a moral sense or even anything around making poor design decisions. Julia's compiler is being asked to do many new things with semantics that necessarily predated many advances in PL.

Re Kernel fusion, there's another piece here, which you may or many not have included in "array-level optimizations". Julia's "just write loops" ethos is awesome, until you get to accelerators...now we're back to an "optimizer defined sub language" as TKF puts it. People like loops and flexibility, Dex, Floops.jl, Tullio, Loopvec and KA.jl show that it's possible to retain structure and emit accelerator-able loopy code. But none of those, except for dex, has a solution for fusing kernels that rely on loops. I'm still using the concept of Kernels, because there's still a bit of a separation between low level CUDA.jl code/these various DSLs and higher level array code, even if not as stark as python or C++.

Would be really cool, if like Dex, there's a plan to fuse these sorts of structured loops as well. Dex does it by having type level indexing and loop effects (they're actually moving to a user defined parallel effect handler system (https://arxiv.org/abs/2110.07493) ...the latter can tell the compiler when it's safe to parallelize and fuse+beta reduce loops. But that relies on structured semantics/effects and a higher level IR than exists in Julia.

Not sure what a Julian solution would look like, if possible. But given the usability wins, it would be great to have in Julia as well.

amkkma··on Correctness and composability bugs in the Julia ecosystem
Hi Keno,

Thanks for the honest assessment. Do you have any thoughts about correctness/ composability of compiler transforms like AD, reliability of GPU acceleration and predictability of optimizations? (basically what you've discussed in some of your compiler talks).

How is that going to be possible in an imperative language? Right now we have lux.jl, which is a pure by convention DL framework, but that ends up being jax without the TPUs, kernel fusion, branching (Lux relies on generated functions) and copy elision (though this last part is being worked on IIUC).

A bunch of folks in the ML, Probprog and fancy array space have been grappling with things like generated functions, type level programming and such, and were wondering about future directions in this space: https://julialang.zulipchat.com/#narrow/stream/256674-compil... there among other discussions

Edit: re : bandwidth issue Jan Vitek's group is thinking a lot about the verification vs flexibility tradeoff and some people are working on a trait/ static typing system. Maybe something can be done to help them along?

amkkma··on Doing small network scientific machine learning in Julia faster than PyTorch
As a Julia evangelist, your point is well received.

I've definitely been making an effort to temper any discussion of benefits with associated drawbacks.

Though, I just want to express WHY I'm so enthusiastic. I've used both R and Python for DS. I'm familiar a bit with matlab.

I've played with Keras and Pytorch.

Aside from all the technical and productivity benefits Julia just feels GOOD to write in, compared to all of the above. It's a real quality of life improvement + a feeling of freedom in that I can express my ideas, compose them with others all without worrying about a different compiler or framework or array type system or having to code units in c++.

This is freeing and honestly, it would be sad if it's relegated to niche status forever. There's definitely a selfish component here, but I'd like everyone to feel the same benefits.

It's hard to go back to pandas or tf or pytorch after using chain.jl, dataframes.jl and flux.

Yes, there are drawbacks with compile times and things like that, which can be annoying. But I keep working in julia because the benefits are worth it, those aren't intrinsic to the language, and most importantly, there's a roadmap to fixing them: https://discourse.julialang.org/t/precompile-why/78770/8 with progress that is tantalizingly close to the end goal of easy dev and easy deployment.

amkkma··on Doing small network scientific machine learning in Julia faster than PyTorch
Do you have a specific example? Did they miss some pytorch optimization? It takes work to write fast idiomatic code. It's not fair to expect someone to be able to squeeze every ounce of performance across n languages and n frameworks. So it's natural that they're not going to know every trick.

Part of what Julia offers is that you need less tweaking, and the whole stack is in julia so it's quite hackable.

amkkma··on Differentiable Programming – A Simple Introduction
which paper?
amkkma··on Cython is 20
When's the last time you've tried it? Load times are way better. New improvements for code caching have been merged in 1.8, and native code caching is coming in 1.9. It's a complex problem due to Julia's aggressive specialization and composability, so you can't just expect Julia to do it like other compiled languages.

Check out this recent writeup from a core dev: https://discourse.julialang.org/t/precompile-why/78770/8

amkkma··on Ask HN: What language will you pick if you are to reinvent the data ecosystem?
Julia
amkkma··on State of Machine Learning in Julia
What are your concerns with MLJ?
amkkma··on State of Machine Learning in Julia
There are innumerable benefits that the compiler gets from being able to see into functions. Codegen, AD, fusion, inlining, user defined arrays and element types being first class etc
amkkma··on State of Machine Learning in Julia
Ask and you shall receive:https://github.com/JuliaLang/julia/pull/41936

That giant runtime enables all sorts of features that are used by unparalleled julia packages.

Soon TM you'll be able to emit runtime free static binaries if you don't need the dynamism. In fact, that's what the GPU compiler does already

amkkma··on Julia frameworks to create desktop GUIs and web apps
Can you elaborate? How does loading a Julia module involve compiling c++?
amkkma··on Julia frameworks to create desktop GUIs and web apps
> there's a LOT more language features required to help tooling in the ecosystem improve.

Aside from interfaces, what would those be?

amkkma··on Julia Computing's co-founder involved in government mass surveillance project
The details and implications seem to be disputed, but in any case, What in the world does this have to do with Julia? What will be accomplished by involving an MIT open source language which is opening new horizons in climate science, physics, economics and other societally important fields?

The happiness and productivity of current and next gen programmers and data scientists are relying Julia's success. If you have ever used the mess that is the pydata stack and its myriad different incompatible type systems, DSLs and APIs, and then breathed the fresh air of Julia, this should resonate. (numpy+pytorch+TF+python lists+ numba+pymc3, jax etc etc )

I have zero affiliation with Viral or Julia Computing, I'm just a guy who wants to continue enjoying writing the next line of code without looking up pandas docs for millionth time.

amkkma··on Generic GPU Kernels
>Higher level abstractions

like these?

https://github.com/JuliaGPU/KernelAbstractions.jl https://github.com/mcabbott/Tullio.jl https://github.com/JuliaFolds/FoldsCUDA.jl https://juliagpu.gitlab.io/CUDA.jl/usage/array/

amkkma··on Generic GPU Kernels
Which Julia version and what were the flaws?
amkkma··on Julia 1.7 Highlights
In this analogy, Julia is the student? Or are you and Julia is the martial arts?

I'd be curious to hear more specific critiques if you don't mind

amkkma··on PyTorch: Where we are headed and why it looks a lot like Julia (but not exactly)
And the two other links?
amkkma··on PyTorch: Where we are headed and why it looks a lot like Julia (but not exactly)
That's just not true.

https://github.com/GenieFramework/Genie.jl https://github.com/JuliaWeb/HTTP.jl https://www.youtube.com/watch?v=xsxJt4prFG4

And with upcoming improvements to binary size and structured concurrency (it already does go-like lightweight threads) it will get even better.

amkkma··on Show HN: Prometeo – a Python-to-C transpiler for high-performance computing
Well IMO it can definitely be rewritten in Julia, and to an easier degree than python since Julia allows hooking into the compiler pipeline at many areas of the stack. It's lispy an built from the ground up for codegen, with libraries like (https://github.com/JuliaSymbolics/Metatheory.jl) that provide high level pattern matching with e-graphs. The question is whether it's worth your time to learn Julia to do so.

You could also do it at the LLVM level: https://github.com/JuliaComputingOSS/llvm-cbe

One cool use case is in https://github.com/JuliaLinearAlgebra/Octavian.jl which relies on loopvectorization.jl to do transforms on Julia AST beyond what LLVM does. Because of that, Octavian.jl. a pure julia linalg library, beats openblas on many benchmarks

amkkma··on Show HN: Prometeo – a Python-to-C transpiler for high-performance computing
Regarding all the questions about Julia:

There's ongoing work to reduce runtime dependencies of Julia (for example in 1.8, you can strip out the compiler and metadata), but then it's only approaching Go/Swift and other static languages with runtimes.

Generating standalone runtime free LLVM is another path, that is actually already pretty mature as it's what is being done for the GPU stack.

Someone just has to retarget that to cpu LLVM, and there's a start here: https://github.com/tshort/StaticCompiler.jl/issues/43

amkkma··on Knowledge Graphs
>I have lost my interest in KGs for Knowledge Representation (in the AI sense)

Hi! Can you say more about that please?

amkkma··on Composability in Julia: Implementing Deep Equilibrium Models via Neural ODEs
cool!
amkkma··on Composability in Julia: Implementing Deep Equilibrium Models via Neural ODEs
in what is your phd?
amkkma··on Maryland nuclear engineer and spouse arrested on espionage-related charges
They wrecked their lives in the course of a crime, as criminals do when they get caught.
amkkma··on New features coming in Julia 1.7
I want to validate the complaints about startup and error messages as a Julia user / fanboy ;)

They don't really bother me anymore personally as I've gotten used to them and make frequent use of packagcompiler.jl

However, I'd just like to say that the core team is aware of these problems and there's active work being done to address them. The general path seems relatively clear, and it's currently just engineer time limited (not like we've hit a wall or ran out of ideas). But I'm confident that with the recent series a and Sciml picking up steam, these things will get ironed out in the next year or two.

amkkma··on Physics-Based Deep Learning Book
That's because it's keeping things fairly simple. Implementing the more involved/advanced techniques would quickly outpace what's possible in python, now and for the foreseeable future

(see https://www.stochasticlifestyle.com/useful-algorithms-that-a... but also other reasons such as composability )

amkkma··on Growing open source from Torch to PyTorch
As a julia user, thanks for this! Inspiring and packed with pearls. There's a lot we can learn from the python community
amkkma··on Growing open source from Torch to PyTorch
yes Flux doesn't ship GPU drivers. It ships everything else (like CUDA toolkit etc) as needed, using the artifact / pkg system, for all mainstream OSes. Doesn't interfere with system libraries.

https://julialang.org/blog/2019/11/artifacts/

amkkma··on Growing open source from Torch to PyTorch
Sure!

NASA: https://www.youtube.com/watch?v=tQpqsmwlfY0

Moderna: https://pumas.ai/ https://discourse.julialang.org/t/has-moderna-used-pumas-ai-...

There are many many more. These unique and sought after capability are what got Julia Computing its 24 mil series A (https://twitter.com/Viral_B_Shah/status/1417128416206376960)

amkkma··on Growing open source from Torch to PyTorch
Some specific steps that will push it past jax/pytorch for chunky array heavy GPU code (can already beat or meet openblas/MKL for kernels written in scalar form).

1. Better compile time memory management (https://github.com/aviatesk/EscapeAnalysis.jl)

2. Linalg passes built on generic composable compiler ecosystem: https://youtu.be/IlFVwabDh6Q?t=818

3. Metatheory.jl egraph based symbolic optimization interleaved with the abstract interpreter: https://github.com/0x0f0f0f/Metatheory.jl

4. Partial eval mixed concrete and abstract interpretation

5. Compiler based autoparallel with dagger.jl

6. New compiler integrated AD (as a package) that isn't based on an accidental lispy compiler hack like zygote: https://github.com/JuliaDiff/Diffractor.jl

7. Changes to array semantics which will include generic immutability/ ownership concepts.

And many more. The key is that all the initial groundwork that traded off fundamental flexibility for specific speed will then feed back into making the ML usecase faster than if it had focused on that initially. People can do all kinds of crazy yet composable things, in pure Julia without modifying the base compiler.

Bonus: Being able to modify the type lattice to track custom program properties. This means that you don't need to be stuck into global tradeoffs with a static type system and can do things like opt in track array shapes at compile time per module: https://twitter.com/KenoFischer/status/1407810981338796035 Other packages like for quantum computing are planning to do their own analyses. It's generic and the usecases and compositions aren't frozen at the outset. (unlike for example, the swift tensors fitting perfectly proposal).

← PreviousPage 2 of 5Next →