Shared memory parallelism in Julia | Kiran Pamnany | Cambridge Julia Meetup (May 2018)
The Julia Programming Language4 HN recommenders · recommended in 3 months, 2018–2019
talk · advanced · 2018–2019 on HN
Kiran Pamnany's Cambridge Julia Meetup talk on Julia's shared memory parallelism and its new task scheduler. It argues that fork-join and work-stealing models nest poorly and presents depth-first scheduling for composable parallelism.
Recommended in Julia threading threads as an insightful, simple explanation of the new task scheduler.
Up next
3 mo on HNMaking R run Fast - Jan Vitek
John O'Neill
3 HN recommender · 2017–2023
16 mo on HNHow Python was Shaped by leaky Internals, Armin Ronacher, Flask framework
Видео с мероприятий {speach!
15 HN recommender · 2017–2025
6 mo on HNThe Unreasonable Effectiveness of Multiple Dispatch | Stefan Karpinski | JuliaCon 2019
The Julia Programming Language
9 HN recommender · 2019–2025
11 mo on HNCppCon 2015: Andrei Alexandrescu “std::allocator...”
CppCon
7 HN recommender · 2017–2025
12 mo on HNPreventing the Collapse of Civilization / Jonathan Blow (Thekla, Inc)
DevGAMM
14 HN recommender · 2020–2025
10 mo on HN"Performance Matters" by Emery Berger
Strange Loop Conference
12 HN recommender · 2019–2025
11 mo on HNThe Thirty Million Line Problem
Molly Rocket
11 HN recommender · 2018–2024
10 mo on HNCppCon 2017: Matt Kulukundis “Designing a Fast, Efficient, Cache-friendly Hash Table, Step by Step”
CppCon
9 HN recommender · 2018–2026
10 mo on HNErlang Factory 2014 - That's 'Billion' with a 'B': Scaling to the Next Level at WhatsApp
Erlang Solutions
6 HN recommender · 2014–2022
9 mo on HNHow Crash Bandicoot Hacked The Original Playstation | War Stories | Ars Technica
Ars Technica
13 HN recommender · 2020–2026
9 mo on HN"How NOT to Measure Latency" by Gil Tene
Strange Loop Conference
9 HN recommender · 2015–2026
10 mo on HNRefterm Lecture Part 1 - Philosophies of Optimization
Molly Rocket
10 HN recommender · 2021–2026
5 comments from Hacker News
By far the most interesting part of this release is the new multi-threading features, I recommend reading link for an overview, and watching ▶ this video for a talk about some unique stuff that's being worked on with Julia's multi-threading (though the depth-first scheduling is not in 1.3 afaik).
Consider a machine with N cores running a program which spawns N parallel tasks, each of which in turn spawns N parallel tasks. Which subtasks do the cores work on initially? If it's the first subtask of each top-level task, that's breadth-first scheduling. If it's all N subtasks of the first top-level task, that's depth-first scheduling. The latter is better for high-performance computing because it tends to be the lower level libraries that are really carefully tuned to make optimal use of the machine (think BLAS/FTT/parallel sum/prefix sum). Previously it was unknown how to implement this kind of scheduling efficiently. See this talk by Kiran Pamnany for more details: ▶ this video
This work has been a monumental collaborative effort and I think the eventual outcome will be pretty spectacular. I gave a talk at an MIT Julia meetup a few months ago that the author of this PR also spoke at; I found his talk to be an insightful overview of this work: ▶ this video
checkout ▶ this video which explains the new features of the task scheduler in a simple fashion. Basically Julia is employing a new algorithm to schedule tasks, where traditional methods would get stuck/blocked. Essentially, if you run a job with parallel tasks and one of the threads finishes, it's extremely difficult to schedulate the free thread, since the data may still be used by the other threads that are busy; thus you need to have clever way to determine how to allocate computational resources. Julia is implementing results of a new paper on how to optimally do this.
Does the Rust Rayon library have the issue the speaker was describing, where parallel inner loops mostly get executed serially once an outer loop is parallelized? (I assume it does, from its Cilk heritage?) Are there workarounds for when that is a problem? Edit: Dumb mistake on my part. I was looking at the video linked in the top comment ( ▶ this video ) and then I came back to this thread and thought it was the topic.