Live data from Hacker News

I want a good parallel language [video]

youtube.com

11–20 of 69 posts

Re: I want a good parallel language [video]

#11
Interesting talk. He mentions Futhark a few times, but fails to point out that his ideal way of programming is almost 1:1 how it would be done in Futhark.

His example is:

  sequence
    .map(|x: T0| ...: T1)
    .scan(|a: T1, b: T1| ...: T1)
    .filter(|x: T1| ...: bool)
    .flat_map(|x: T1| ...: sequence)
    .collect()
It would be written in Futhark something like this:

  sequence
    |> map (\x -> ...)
    |> scan (\x y -> ...)
    |> filter (\x -> ...)
    |> map (\x -> ...) 
    |> flatten

Re: I want a good parallel language [video]

#13
post #9
post #5

There were a few languages designed specifically for parallel computing spurred by DARPA's High Productivity Computing Systems project. While Fortress is dead, Chapel is still being developed.

iirc those were oriented more towards large HPC clusters rather than computation on single node?

Chapel, at least, aims for both. You can write loops that it will try to compile to use SIMD instructions, or even for the GPU: https://chapel-lang.org/docs/technotes/gpu.html

Re: I want a good parallel language [video]

#14

Interesting talk. He mentions Futhark a few times, but fails to point out that his ideal way of programming is almost 1:1 how it would be done in Futhark. His example is: sequence .map(|x: T0| ...: T1) .scan(|a: T1, b: T1| ...: T1) .filter(|x: T1| ...: bool) .flat_map(|x: T1| ...: sequence ) .collect() It would be written in Futhark something like this: sequence |> map (\x -> ...) |> scan (\x y -> ...) |> filter (\x…

Also, while not exactly the algorithm Raph is looking for, here is a bracket matching function (from Pareas, which he also mentions in the talk) in Futhark: https://github.com/Snektron/pareas/blob/master/src/compiler/...

I haven't studied it in depth, but it's pretty readable.

Re: I want a good parallel language [video]

#15
post #9
post #5

There were a few languages designed specifically for parallel computing spurred by DARPA's High Productivity Computing Systems project. While Fortress is dead, Chapel is still being developed.

iirc those were oriented more towards large HPC clusters rather than computation on single node?

the distinction matters less and less. Inside the GPU there is already plenty of locality to exploit (catches, schedulers, warps). nvlink is a switch memory access network, so that already gets you some fairly large machines with multiple kinds of locality.

throwing infiniband or IP on top is really structurally more of the same.

Chapel definitely can target a single GPU.

Re: I want a good parallel language [video]

#16

I think a good parallel language will be the one that takes your code written with tasks and channels, understands its logic, rewrites and compiles it in the most efficient way. I don't feel that I have to write something harder than that as a pity human.

mapping from channels to SIMD seems kind of intractable, its a kind of lifting that involves looking across the producers and the consumers.

going the other direction, making channel runtimes run SIMD, is trivial

Re: I want a good parallel language [video]

#18
post #4

SQL. It is a joke, but an SQL engine can be massively parallel. You just don't know it, it just gives you what you want. And in many ways the operations resembles what you do for example in CUDA. CUDA backend for DuckDB or Trino would be one of my go-to projects if i was laid off.

My issue with SQL is lack of composability and difficulty of debugging intermediate results.

Re: I want a good parallel language [video]

#19

Interesting talk. He mentions Futhark a few times, but fails to point out that his ideal way of programming is almost 1:1 how it would be done in Futhark. His example is: sequence .map(|x: T0| ...: T1) .scan(|a: T1, b: T1| ...: T1) .filter(|x: T1| ...: bool) .flat_map(|x: T1| ...: sequence ) .collect() It would be written in Futhark something like this: sequence |> map (\x -> ...) |> scan (\x y -> ...) |> filter (\x…

Also, while not exactly the algorithm Raph is looking for, here is a bracket matching function (from Pareas, which he also mentions in the talk) in Futhark: https://github.com/Snektron/pareas/blob/master/src/compiler/... I haven't studied it in depth, but it's pretty readable.

(author here) check_brackets_bt is actually exactly the algorithm that Raph mentions

Re: I want a good parallel language [video]

#20
post #4

SQL. It is a joke, but an SQL engine can be massively parallel. You just don't know it, it just gives you what you want. And in many ways the operations resembles what you do for example in CUDA. CUDA backend for DuckDB or Trino would be one of my go-to projects if i was laid off.

My issue with SQL is lack of composability and difficulty of debugging intermediate results.

is it a language problem though? it's just lack of tooling.
Post reply on HN