2,083 karma · joined Sep 27, 2015 (11y ago) · 346 submissions
comment 2y ago · link · parent
> But keep in mind our code gen is still on its infancy, and is nowhere as mature as SOTA compilers like GCC and GHC.
Second paragraph of Bend's GUIDE.md:
> While cool, Bend is far from perfect. In absolute terms it is still not so fast. Compared to SOTA compilers like GCC or GHC, our code gen is still embarrassingly bad, and there is a lot to improve. That said, it does what it promises: scaling horizontally with cores.
Limitations session on HVM2's paper:
> While HVM2 achieves near-linear speedup, its compiler is still extremely immature, and not nearly as fast as state-of-art alternatives like GCC of GHC. In single-thread CPU evaluation, HVM2, is still about 5x slower than GHC, and this number can grow to 100x on programs that involve loops and mutable arrays, since HVM2 doesn’t feature these yet.
comment 2y ago · link · parent
I thought you was talking about the DEMO example, which ran ~30% slower than expected. Instead, you were talking about the README, which was actually incorrect. I noticed the error and edited it. I explained the issue in another comment.
comment 2y ago · link · parent
comment 2y ago · link · parent
I'm personally putting a LOT of effort to make our claims as accurate and truthful as possible, in every single place. Documentation, website, demos. I spent hours in meetings to make sure everything is correct. Yet, sometimes it feels that no matter how much effort I put, people will just find ways to misinterpret it.
We published the real benchmarks, checked and double checked. And then you complained some benchmarks are not so good. Which we acknowledged, and provided causes, and how we plan to address them. And then you said the benchmarks need more evaluation? How does that make sense in the context of them being underwhelming?
We're not going to compare to Mojo or other languages, specifically because it generates hate.
Our only claim is:
HVM2 is the first version of our Interaction Combinator evaluator that runs with linear speedup on GPUs. Running closures on GPUs required colossal amount of correctness work, and we're reporting this milestone. Moreover, we finally managed to compile a Python-like language to it. That is all that is being claimed, and nothing else. The codegen is still abysmal and single-core performance is bad - that's our next focus. If anything else was claimed, it wasn't us!
comment 2y ago · link · parent
comment 2y ago · link · parent
Bend's codegen is still abysmal, but these are all low-hanging fruits. Most of the work went into making the parallel evaluator correct (which is extremely hard!). I know that sounds "trust me", but the single-thread performance will get much better once we start compiling procedures, generating loops, etc. It just hasn't been done.
(I wonder if I should have waited a little bit more before actually posting it)
comment 2y ago · link · parent
For the `sum` example, Bend has a huge disadvantage, because it is allocating 2 IC nodes for each numeric operation, while Python is not. This is obviously terribly inefficient. We'll avoid that soon (just like HVM1 did it). It just wasn't implemented in HVM2 yet.
Note most of the work behind Bend went into making the parallel evaluator correct. Running closures and unrestricted recursion on GPUs is extremely hard. We've just finished that part, so, there was basically 0 effort into micro-optimizations. HVM2's codegen is still abysmal. (And I was very clear about it on the docs!)
That said, please try comparing the Bitonic Sort example, where both are doing the same amount of allocations. I think it will give a much fairer idea of how Bend will perform in practice. HVM1 used to be 3x slower than GHC in a single core, which isn't bad. HVM2 should get to that point not far in the future.
Now, I totally acknowledge these "this is still bad but we promise it will get better!!" can be underwhelming, and I understand if you don't believe on my words. But I actually believe that, with the foundation set, these micro optimizations will be the easiest part, and performance will skyrocket from here. In any case, we'll keep working on making it better, and reporting the progress as milestones are reached.
comment 2y ago · link · parent
104.
Bend: a high-level language that runs on GPUs (via HVM2)(github.com ↗)
1041 points · by LightMachine · 2y ago · 253 comments
comment 2y ago · link · parent
Short answer: GPU
Long answer: CUDA
Seriously though. Implementing a full high-level lang in parallel is HARD, so, to simplify it greatly, we made IC nodes 64-bit, which allows us to use native 64-bit atomic operations in many parts of the implementation. Since each 64-bit node has 2 ports, that gives us 32 bits per port. And since we use 3 bits for the tag, that leaves us with 29 bit payloads. We used that space to easily implement unboxed numbers (f24, u24, i24).
That said, we will have (boxed) 64-bit numbers soon! With this foundation in place, adding them is a matter of coding. I just want to have some time to let people use the limited version, find bugs, etc., before I add more stuff.
comment 2y ago · link · parent
comment 2y ago · link · parent
comment 2y ago · link · parent
- Bend: a high-level language that runs on GPUs, powered by HVM2
Or something similar. I don't like this one because it feels too self-important and not really informative (how do you know what it is about without clicking?). But perhaps I'm overthinking this?
comment 2y ago · link · parent
Thanks for posting, but our URL is wrong, it should be: HigherOrderCO.com. I can't post it again (gets flagged as a duplicate). Would appreciate if HN mods could change it!
Anyway, after years of hard work, HVM2 is finally production ready, and we're delivering on a long promise: targeting GPUs! And Bend is a new, Python-like and Haskell-like language to interface with it.
Let me know if you have any questions!
111.
1 points · by LightMachine · 2y ago · discuss
comment 2y ago · link · parent
Basically I'm saying that (on my view) GPTs is kinda growing an AGI procedure inside it, but that AGI is restricted by rigid computational constraints imposed by the GPT architecture. I think something slightly more flexible might be capable of filtering out the noise more efficiently and replicate what GPTs do with an absurdly small fraction of the cost.
So, to be very clear, the point has nothing to do with Turing completeness and more to do with the ultra-limited computation and expressivity granted to internally learned functions. It is a small distinction, but a non-Turing complete model can still be extremely expressive.
113.
Claude-3 emulates Pokémon Red(twitter.com ↗)
3 points · by LightMachine · 2y ago · discuss
114.
PSA: GPT-4 Is Obsolete(twitter.com ↗)
2 points · by LightMachine · 2y ago · discuss