Leios Labs
Leios Labs
  • 27
  • 7 019 425
Introduction to kernel (GPU) programming in Julia with an NBody simulation
This is a lecture I did recently at MIT. I was a little low energy, but thought the lecture turned out reasonably well and certainly had information that is hard to find elsewhere.
I edited it to remove faces and names (except Valentin, who is a core developer of the Julia language and a personal friend of mine).
Final code here: github.com/leios/simuleios/blob/master/nbody/nbody.jl
00:00 Introduction
01:25 GPUs in Julia
11:52 Nbody intro
15:55 NBody implementation
51:15 CPU parallelization
57:45 KernelAbstractions start
1:20:27 CPU GPU profiling
1:23:17 Discussion
Переглядів: 2 259

Відео

My Carry-on Computer
Переглядів 20 тис.2 роки тому
Patreon: www.patreon.com/leiosos Github sponsors (Patreon for code): github.com/sponsors/leios Twitch: www.twitch.tv/leioslabs Discord: discord.gg/QctJhUA Github: github.com/leios Music: www.joshwoodward.com/ Wall of thanks (patreon supporters): Mossy Fogarty Valentin Churavy Jérémie Mutual Information Ahmed Hesham Reza Salari
Barnsley ferns, but actually explaining each function
Переглядів 20 тис.3 роки тому
www.algorithm-archive.org/contents/barnsley/barnsley.html Patreon: www.patreon.com/leiosos Github sponsors (Patreon for code): github.com/sponsors/leios Twitch: www.twitch.tv/leioslabs Discord: discord.gg/QctJhUA Github: github.com/leios Music: www.joshwoodward.com/ Wall of thanks (patreon supporters): Mossy Fogarty Valentin Churavy Jérémie Mutual Information Ahmed Hesham
I coded a workout
Переглядів 7 тис.3 роки тому
Patreon: www.patreon.com/leiosos Github sponsors (Patreon for code): github.com/sponsors/leios Twitch: www.twitch.tv/leioslabs Discord: discord.gg/QctJhUA Github: github.com/leios Music: www.joshwoodward.com/ Wall of thanks (patreon supporters): Mossy Fogarty Valentin Churavy Mutual Information
Christianity's most important algorithm
Переглядів 12 тис.3 роки тому
Algorithm Archive: www.algorithm-archive.org/contents/computus/computus.html Github sponsors (Patreon for code): github.com/sponsors/leios Patreon: www.patreon.com/leiosos Twitch: www.twitch.tv/leioslabs Discord: discord.gg/QctJhUA Github: github.com/leios Music: www.joshwoodward.com/ Wall of thanks (patreon supporters): Mossy Fogarty Mutual Information
What are affine transformations?
Переглядів 84 тис.3 роки тому
Algorithm Archive: www.algorithm-archive.org/contents/affine_transformations/affine_transformations.html Github sponsors (Patreon for code): github.com/sponsors/leios Patreon: www.patreon.com/leiosos Twitch: www.twitch.tv/leioslabs Discord: discord.gg/QctJhUA Github: github.com/leios Music: www.joshwoodward.com/
How does flood fill work?
Переглядів 26 тис.3 роки тому
Algorithm Archive: www.algorithm-archive.org/contents/flood_fill/flood_fill.html Source code: In chapter Github sponsors (Patreon for code): github.com/sponsors/leios Twitch: www.twitch.tv/leioslabs Discord: discord.gg/QctJhUA Github: github.com/leios Music: www.joshwoodward.com/
The Problem with Research Software Engineering
Переглядів 20 тис.3 роки тому
A discussion about how to make research software engineering a bit better! Github sponsors (Patreon for code): github.com/sponsors/leios Twitch: www.twitch.tv/leioslabs Discord: discord.gg/QctJhUA Github: github.com/leios Bibliography [1] joss.theoj.org/papers/10.21105/joss.01037 [2] journals.aps.org/prfluids/abstract/10.1103/PhysRevFluids.4.054701
How to color complex functions [Domain Coloring]
Переглядів 12 тис.3 роки тому
Algorithm Archive: www.algorithm-archive.org/contents/domain_coloring/domain_coloring.html Source code: In chapter Github sponsors (Patreon for code): github.com/sponsors/leios Twitch: www.twitch.tv/leioslabs Discord: discord.gg/QctJhUA Github: github.com/leios Music: www.joshwoodward.com/
How to make fractals by counting
Переглядів 8 тис.3 роки тому
Algorithm Archive: www.algorithm-archive.org Source code: github.com/leios/simuleios/blob/master/fractal/sierpinski.cpp Github sponsors (Patreon for code): github.com/sponsors/leios Twitch: www.twitch.tv/leioslabs Discord: discord.gg/QctJhUA Github: github.com/leios Music: www.joshwoodward.com/
Iterated Function Systems
Переглядів 14 тис.3 роки тому
Algorithm Archive: www.algorithm-archive.org/contents/IFS/IFS.html Source code: github.com/leios/simuleios/blob/master/fractal/sierpinski.cpp Github sponsors (Patreon for code): github.com/sponsors/leios Twitch: iwww.twitch.tv/leioslabs Discord: discord.gg/QctJhUA Github: github.com/leios I know everyone has done videos on a similar topic before, but it is usually through the perspective of cha...
Gaussian Elimination
Переглядів 43 тис.5 років тому
Algorithm Archive chapter: www.algorithm-archive.org/contents/gaussian_elimination/gaussian_elimination.html I thought this was a cool visualization to show you guys. Examples of Gaussian Elimination: - math.dartmouth.edu/archive/m23s06/public_html/handouts/row_reduction_examples.pdf - ua-cam.com/video/2GKESu5atVQ/v-deo.html - ua-cam.com/video/jOC4fMgl7TI/v-deo.html Twitch: www.twitch.tv/leiosl...
Simulating Quantum Systems [Split Operator Method]
Переглядів 31 тис.5 років тому
More information here: www.algorithm-archive.org/contents/split-operator_method/split-operator_method.html If you want to contribute, here's the github repo: github.com/algorithm-archivists/algorithm-archive The music came from Josh Woodward: www.joshwoodward.com/ Please feel free to follow me on Twitter: LeiosOS Twitch (where I do all the simulations): www.twitch.tv/leioslabs or Gi...
Verlet Integration
Переглядів 72 тис.6 років тому
Here's a video describing a simple method to solve Newton's equations of motion. More info can be found here: www.algorithm-archive.org/chapters/physics_solvers/verlet/verlet.html If you want to contribute, here's the github repo: github.com/algorithm-archivists/algorithm-archive The music came from Josh Woodward (sped up 1.5 times): www.joshwoodward.com/ Please feel free to follow me on Twitte...
Arcane Algorithm Archive Introduction
Переглядів 48 тис.6 років тому
Arcane Algorithm Archive Introduction
How algorithms evolve (Genetic Algorithms)
Переглядів 115 тис.7 років тому
How algorithms evolve (Genetic Algorithms)
Code Night: Drawing a Heart
Переглядів 14 тис.7 років тому
Code Night: Drawing a Heart
Euclid's Amazing Orchard
Переглядів 10 тис.7 років тому
Euclid's Amazing Orchard
WorstSort: the WORST sorting algorithm
Переглядів 62 тис.7 років тому
WorstSort: the WORST sorting algorithm
Gift Wrapping Algorithm (Convex Hull)
Переглядів 66 тис.7 років тому
Gift Wrapping Algorithm (Convex Hull)
Understanding 4D -- The Tesseract
Переглядів 5 млн7 років тому
Understanding 4D The Tesseract
Socially awkward simulation: Learning to dance with Steve, the Kuramoto oscillator!
Переглядів 20 тис.7 років тому
Socially awkward simulation: Learning to dance with Steve, the Kuramoto oscillator!
Color Quantization
Переглядів 16 тис.7 років тому
Color Quantization
Impossible lenses
Переглядів 170 тис.7 років тому
Impossible lenses
What is a determinant?
Переглядів 379 тис.7 років тому
What is a determinant?
What is Monte Carlo?
Переглядів 219 тис.7 років тому
What is Monte Carlo?
What is an Eigenvector?
Переглядів 427 тис.7 років тому
What is an Eigenvector?

КОМЕНТАРІ

  • @TesserId
    @TesserId 3 години тому

    Good stuff, but I was looking for an animation showing the growth of the fern in the way real ferns grow in nature.

  • @tror2285
    @tror2285 День тому

    crystal clear, thank you.

  • @yrbttncrtlrrbttncrtlrr1855
    @yrbttncrtlrrbttncrtlrr1855 2 дні тому

    does it mean that the determinant of a matrix (in dimension 3x3) tell us how much can we magnify another matrix (also 3x3 representing a cube) if we multiply the first one by the second??? If this is it, it´s astounding awesome!!!

  • @darya_vi
    @darya_vi 4 дні тому

    That's great! Thank you!

  • @fantasyprone5054
    @fantasyprone5054 5 днів тому

    Yea. So what is those numbers symbols etc 👀

  • @gwenaellepage4450
    @gwenaellepage4450 7 днів тому

    Nice video. Bur please get rid of the annoying musical background, it doesn't bring anything…

  • @ronaldmcisaac
    @ronaldmcisaac 8 днів тому

    well, that explains the weird shit on magic mushrooms; I'll just assume those enhanced visual aberrations; maybe fourth dimension beings were passing through my space, like me diving into a bottomless pond

    • @ronaldmcisaac
      @ronaldmcisaac 8 днів тому

      now, what do you fourth dimensional beings gravitate toward? why do they move through dimensions? exploring, mapping, etc.

  • @DavidRoigCollell
    @DavidRoigCollell 10 днів тому

    Your explanation is incredibly clear. Thank you!!

  • @rickgrimes47
    @rickgrimes47 11 днів тому

    I am thinking of building one but I'll have to improvise because this nanuk 935 is very expensive. It alone will cost more than my entire setup.

    • @LeiosLabs
      @LeiosLabs 11 днів тому

      Just make sure whatever you get is sturdy enough. If you don't need to take it on a plane, then liquid cooling can save you some space.

    • @rickgrimes47
      @rickgrimes47 11 днів тому

      @@LeiosLabs Thank you for this video.

  • @panchovilla545
    @panchovilla545 11 днів тому

    Now can you explain 5D objects?

  • @Venaloid
    @Venaloid 12 днів тому

    Every laptop I've owned has had some weird firmware issue eventually, so I fully approve of this project.

  • @xungngo
    @xungngo 13 днів тому

    now I understand why Thanos really wants this tesseract, it's the confusion stone

  • @xungngo
    @xungngo 13 днів тому

    don't let them scare you this is ezpz... show us 13D already

  • @user-xh2ee3lu2n
    @user-xh2ee3lu2n 13 днів тому

    Hope your Friday is figured out. What's the best option for someone of your levels computer programming ability offering a zoom or live tutoring session

    • @LeiosLabs
      @LeiosLabs 13 днів тому

      Wait, what do you mean? This one was for work for MIT.

  • @etkatt6185
    @etkatt6185 14 днів тому

    Great vid

  • @dark3l192
    @dark3l192 16 днів тому

    but why do we compute the determinant of 3x3 matrix like that? is there any reason of hiding rows and columns and alternative + and -?

  • @user-ru4xd9dt1m
    @user-ru4xd9dt1m 17 днів тому

    Hình học cố định chỉ có hình khối và hình mỏng. Hình mà ng ta gọi là hình 2D thực ra là hình mỏng còn hình 3D, 4D, 5D... đều là hình khối

  • @syedsaeedalsefat1878
    @syedsaeedalsefat1878 17 днів тому

    This is not the place for not being so informal. I think using slang...the harsh slang is not appropriate to use here.

  • @TheCraftNut
    @TheCraftNut 20 днів тому

    you had me all the way until the projections. i don’t understand what that has to do with anything other than the fact our screens really can only project a 2d image so in a way we still have to imagine what this shape is doing. ya idk. i don’t get that part.

  • @BloxxingDinosaurus
    @BloxxingDinosaurus 21 день тому

    I can understand at least a little bit of this video now that I am in my second Computer Science semester.

  • @geertdepuydt2683
    @geertdepuydt2683 23 дні тому

    Very much appreciated

  • @AidanFoulk
    @AidanFoulk 24 дні тому

    This is awesome! I'm currently trying to program a tesseract into desmos and this really helped me visualize the math side of it. Great stuff!

  • @x1x2x125
    @x1x2x125 25 днів тому

    Hey, take care of your hand. I haven't seen you live in a while, I think you were talking about gravity simulations last I checked. Keep it up!

    • @LeiosLabs
      @LeiosLabs 25 днів тому

      Yeah, this is exactly how we did the gravity sims. I've been working with MIT on similar code. As for the hand, I use a drawing tablet as a mouse, so I need some glove to keep my hand from rubbung against it. I'm trying to make sure I don't have any problems in the future ^^ Hope you are doing well!

  • @aleksszukovskis2074
    @aleksszukovskis2074 26 днів тому

    so you didnt succeed

    • @LeiosLabs
      @LeiosLabs 26 днів тому

      Wait, succeed in what?

  • @coreytyndall
    @coreytyndall 26 днів тому

    You can't live in 2 dimensional. Your organs would spell out and you die. But in sweet dimensional, you could survive and in 4 dimensional. You'd have the same result as it would happen, you can't survive there. But 5 dimensional, it's OK, you can survive.

  • @coreytyndall
    @coreytyndall 26 днів тому

    You have to lose a projector so you could actually hold a gram to make a fold I mentioned space. Yeah, that's true, cause you can't fit it on on a 2 dimensional date auto 2 dimensional point. It's like when you get a one-dimensional object and you try to fit 2 dimensional. It could only fit what you're seeing, but to 4 dimensional people. They could really see everywhere. You're going.

  • @Gordy-io8sb
    @Gordy-io8sb 27 днів тому

    2 years between now and your last upload. Seems like this channel is pretty much ded, and you're just throwing some scrap.

    • @LeiosLabs
      @LeiosLabs 27 днів тому

      I understand why you think that and encourage you to unsubscribe if you like. That said, I've been working really, really hard on some upcoming content. Hopefully it will make sense why it took so long when it comes out later this year. I'm shooting for November, so it might not be until 2025. I hesitated uploading this one because I know it would appear like I've "given up," but the lecture does genuinely have content you can't find anywhere else that is very relevant to understanding some of the work I've been doing lately.

    • @ncolyer
      @ncolyer 26 днів тому

      @@LeiosLabs i found this very interesting btw

    • @rickgrimes47
      @rickgrimes47 11 днів тому

      2 years is nothing if you start working on a project you like. If you were an engineer you would know that.

  • @shyrealist
    @shyrealist 27 днів тому

    I think at the start you were talking about the benefits for debugging but then at the end you cut out all the debugging 😢 I was hoping to see how obvious (from the error messages) the mistakes were and also what were the changes that you had to make when switching to the RocArray?

    • @shyrealist
      @shyrealist 27 днів тому

      I spoke too soon 😅 Thanks for talking about the error messages from the kernel!

    • @LeiosLabs
      @LeiosLabs 27 днів тому

      Also, there were no real changes for ROCArray except for moving the data to an Array for plotting

  • @anakimluke
    @anakimluke 28 днів тому

    Syntax highlighting?? Who are you and what have you done with the real james??

    • @LeiosLabs
      @LeiosLabs 28 днів тому

      Shoot, they're on to me. (but yeah, I'll use it for lectures)

  • @TennisGvy
    @TennisGvy 28 днів тому

    So excited for this!

    • @LeiosLabs
      @LeiosLabs 28 днів тому

      Haha, I hope it's actually interesting ^^'

  • @user-vt4bz2vl6j
    @user-vt4bz2vl6j 28 днів тому

    You upload and im first lesgoooo

    • @LeiosLabs
      @LeiosLabs 28 днів тому

      Haha, you were fast! I have "real" content in the works. This was just a lecture that I thought some people might be interested in here.

    • @user-vt4bz2vl6j
      @user-vt4bz2vl6j 27 днів тому

      Anything works! I like to learn usefull stuff. Tips on where I could find more quality content?

    • @LeiosLabs
      @LeiosLabs 27 днів тому

      @@user-vt4bz2vl6j Well, anything from the Summer of Math is great

  • @Moe_mk1234
    @Moe_mk1234 Місяць тому

    So basicly in palin english. A tessarect is actualy like a corners streched out elastic cube

  • @Hanjjjixd
    @Hanjjjixd Місяць тому

    Id become Hulk by now by the total of my mistake to be honest 😂😂

  • @george-stefanleoca1319
    @george-stefanleoca1319 Місяць тому

    i get the part when it ain't moving along the w parameter, but when that starts my brain melts.

  • @santiagocanepa9099
    @santiagocanepa9099 Місяць тому

    First explanation that actually nails it!! THANKS

  • @FaffyWaffles
    @FaffyWaffles Місяць тому

    PREACH

  • @user-go1ip4wo2o
    @user-go1ip4wo2o Місяць тому

    mate i literally fucking love you thank you so much this saved me so much time!!!!!

  • @user-pq9qz5zl7t
    @user-pq9qz5zl7t Місяць тому

    this is some fancy bento box

  • @5ty717
    @5ty717 Місяць тому

    Very clear

  • @5ty717
    @5ty717 Місяць тому

    Brilliant lesson. Terrible music - too loud bro.

  • @swedensy
    @swedensy Місяць тому

    I cant grasp have you can see even 3d on a 2d screen. Like pictures they are all 2d. Most people have this disorder where they "can" 2d as see 3d.

  • @ammart-ws9qk
    @ammart-ws9qk Місяць тому

    underrated one Now i just completly understand after searching a lot around 5 months

  • @user-vt4bz2vl6j
    @user-vt4bz2vl6j Місяць тому

    I would like to know the chances of ending up here randomly on easter.

  • @muxammadrizo3643
    @muxammadrizo3643 Місяць тому

    🤯🤯🤯amazing explanation Thanks

  • @volkanzumrut1635
    @volkanzumrut1635 Місяць тому

    1:19 I think I get lost here. Why does it have to expand when you move the w dimensions???

    • @tscott6321
      @tscott6321 Місяць тому

      The W axis is basically connected to the X, Y, and Z axis (basically an invisible line that is a right angle to each axis). So if the only thing you're giving data/value to is W axis and nothing else it looks like it's expanding because of human's basic visual concepts.

  • @dutonic
    @dutonic Місяць тому

    This is a weird comment. But I feel like your voice doesn't match your face. Like I've never felt this way before in my life and it's really strange. It's not an insult at all. You have both a nice voice and nice face! It's just super weird seeing you sound like that. Idk how to describe it!!! It's crazy. Has anyone said this to you before? Awesome video btw. I'm studying fractal topology and this was super helpful!

    • @LeiosLabs
      @LeiosLabs Місяць тому

      Been on UA-cam and twitch for years and have never heard that specifically. I have been told I sound like a teenager / feminine / nerdy when it's just my voice.

    • @LeiosLabs
      @LeiosLabs Місяць тому

      And I guess the fractal work is with IFSs, which is why you need affine transforms?

    • @dutonic
      @dutonic Місяць тому

      @@LeiosLabs IFS is the goal I'm working toward! I'm still new to the subject. Working through the first chapter of "Fractal Geometry" by Kenneth Falconer.

    • @LeiosLabs
      @LeiosLabs Місяць тому

      @@dutonic yeah, IFSs are really fun. I actually use them all the time for various tasks. There will (hopefully) be a video later this year showing how useful they are

  • @eustab.anas-mann9510
    @eustab.anas-mann9510 Місяць тому

    Babby's first day on Wikipedia. 🚬🗿

  • @Erick_The_Green
    @Erick_The_Green Місяць тому

    now you know how god hides

  • @itsandrocyber
    @itsandrocyber Місяць тому

    I lost it when I saw numbers 😂

  • @user-ul5hi1mt3f
    @user-ul5hi1mt3f Місяць тому

    make one or of laptop motherboard cpu gpu + batteries etc