GPU Programming with The Metal Shading Language

GPU Programming with The Metal Shading Language

2etime

4 года назад

18,131 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@CyrusPellet
@CyrusPellet - 11.05.2020 09:12

Awesome! Please don't stop making these, your videos are so underrated!

Ответить
@platin2148
@platin2148 - 11.05.2020 15:22

So ideally we would also add a simd way just for good measure (by directly using the instrinsics).

Ответить
@caporazor1
@caporazor1 - 11.05.2020 17:32

this is just a brilliant tutorial. thanks man!

Ответить
@spartanrasul2260
@spartanrasul2260 - 13.05.2020 17:38

the quality of your content become so much better. And i know that, because i was watching your videos right from the first one
(and i've seen your backflip)

Ответить
@pitmanra
@pitmanra - 07.08.2020 17:51

I'd be lying if I said I understood very much of this. But I'm interested and I'll keep watching your videos. I would find it useful if you would frequently refer your code to a chart to show what you are doing. Like a chart that shows Command Queues, Command Buffers, drawables, Render Pass Descriptors, etc. "This code is our buffer; this is how it relates to the chart." Lotta work, I know. Your enthusiasm is infectious.

Ответить
@Shane-rh3wu
@Shane-rh3wu - 12.08.2020 08:23

This is fantastic! Thanks for sharing <3

Ответить
@HareshKainth
@HareshKainth - 19.08.2020 19:46

You, sir, are a gentleman and a scholar. Thank you.

Ответить
@Peterrayism
@Peterrayism - 11.09.2020 07:31

Watching you teach is making my wave function collapse.

Ответить
@StuartDesign
@StuartDesign - 06.11.2020 03:46

Am I right in thinking that for processing a 2d texture, you would want the largest number of threads that will fit 'square' inside of each max thread group. Is this done to ensure that the uint2 thread coords align with texture's x,y coords? Or is it just as convenient/efficient to create thread groups that might be 'retangular'?

Ответить
@Enter_channel_name
@Enter_channel_name - 12.11.2020 20:01

GPU is executing multiple tasks all at once

CPU is executing multiple tasks one at a time

Ответить
@brandonwinston
@brandonwinston - 17.01.2021 06:03

This is gold

Ответить
@VoodooBoot
@VoodooBoot - 30.01.2021 10:03

Great video, thanks!
The GitHub link point to an empty branch.

Ответить
@JeremyChone
@JeremyChone - 08.02.2021 19:11

Very nice. Love the by example approach.

Ответить
@LaurentLaborde
@LaurentLaborde - 15.02.2021 10:44

I'm pretty sure you don't need to explain that we can do general purpose computation on GPU in 2020+ ;)

Ответить
@AmitSingh-nr8jz
@AmitSingh-nr8jz - 16.02.2021 15:12

Simply Awesome !!!!!!!!!!!

Ответить
@Ha-ue9kg
@Ha-ue9kg - 14.03.2021 23:45

you fucking god. this is the best metal channel on YT.

Ответить
@tojuju
@tojuju - 06.04.2021 20:37

i went over your videos months ago, but this time, i'm not going to give up to confusion.

to those not in a graphics rendering or game dev background, this stuff seems so damned foreign..but stay strong, everyone!

Ответить
@abil.sudarman
@abil.sudarman - 20.08.2021 00:45

well produced video!

Ответить
@MrHirenP
@MrHirenP - 23.08.2021 10:09

Your metal shading language playlist has only video :(

Ответить
@harshpatel105
@harshpatel105 - 10.10.2021 06:03

Awesome :D

Ответить
@LaurentLaborde
@LaurentLaborde - 02.11.2021 09:47

Copy/paste from apple documentation : "Always use a multiple of a type’s stride instead of its size when allocating memory or accounting for the distance between instances in memory."

Ответить
@elgs1980
@elgs1980 - 17.11.2021 00:36

Thank you so much! The last time I saw such a precious video like this was about 10 years ago.

Ответить
@crearg8259
@crearg8259 - 02.02.2022 21:36

Hi, I’m new to this area. I only had experience in cuda. Does M1 Pro/Max work the same way as Radeon does on MBP 2019-? I’m confused with the merged vRAM of silicon platform and does the 10 GPU cores of M-processors accelerate parallel computing like cuda does with its thousands of cuda cores?

Ответить
@geekoutnerd7882
@geekoutnerd7882 - 15.02.2022 22:12

Thank you so much.

Ответить
@essamal-mansouri2689
@essamal-mansouri2689 - 25.03.2022 04:25

Did you try using the new m1 pro/max/ultra with Metal? I would really like to know how the unified memory architecture comes into play when it comes to sending data back and forth between cpu and gpu.

Ответить
@Txgdfgvz367ur
@Txgdfgvz367ur - 27.05.2022 00:12

Hi, thanks for these awesome videos, hopefully you're still active! I plan on using the shader to update an array using two other arrays similar to what you've described. I can't quite figure out how to get the full updated array back from the buffer after processing, to use on the CPU. trying to print the array after binding to memory just brings up the following. Hope that makes sense I'm fairly new to this!

Ответить
@swift_goose
@swift_goose - 15.06.2022 18:01

Bro this is an awesome video, thank you so much for taking the time. What a great introduction to Metal! Would love to see you back with more new tutorials now that Metal3 is around

Ответить
@THE_ONLY_GOD
@THE_ONLY_GOD - 25.07.2022 11:53

Wow, thanks for the tutorial! That seems to be a pretty precise way to control a gpu. Was feeling more nerdy than I prefer to while watching though. Haha.

Ответить
@monfera
@monfera - 22.08.2022 13:06

The 3+ seconds for the CPU based componentwise addition of two arrays of 3 million numbers is some orders of magnitude too long, why is that? I get 0.02 seconds in JavaScript (not even a statically typed language, and time includes some interpreted execution and warmed up JIT compilation phases too):

a = [...new Array(3e6)].map(Math.random);

b = [...new Array(3e6)].map(Math.random);

(t0 = performance.now(), result=new Array(3e6).fill(0), (() => {for(let i = 0; i < 3e6; i++) result[i]=a[i]+b[i]})(), console.log((performance.now() - t0)/1000), result);

Ответить
@ritikagupta5600
@ritikagupta5600 - 29.12.2022 05:32

I am new to MSL ios, I have a windows laptop, but I need to work on MSL , can anyone help me know which IDE should i be using now to start coding in metal?

Ответить
@chuhanfeng6552
@chuhanfeng6552 - 17.02.2023 02:34

How should I make a buffer for 2-D array? Do I have to concatenate it into 1D array?

Ответить
@fsteaglech
@fsteaglech - 14.04.2023 17:25

Thank you! Very very nice video! I strongly believe that this is the only video / tutorial that explains loud and clear how to use GPU and metal to performs calulations instead of rendering! I have some issues - however - undestanding how to bind back complex data structures as results in Swift; in C with pointer is quite easy but in Swift is a bit tricky; can you point me to some examples? Thanks!

Ответить
@theupsiloninitiative8894
@theupsiloninitiative8894 - 02.05.2023 06:29

Hi, I love the videos. However, I specialize in cpp. Can you release a video of this but as a cpp (or I guess objective cpp) rather than a swift file?

Ответить
@eldarsadykov
@eldarsadykov - 06.09.2023 03:05

Brilliant video!

Ответить
@alexnovikov1609
@alexnovikov1609 - 10.11.2023 18:48

Thank you very much! This is a really clear and good explanation about how we use GPU in Metal. Keep going! You're the best!

Ответить
@natgenesis5038
@natgenesis5038 - 16.11.2023 18:55

Can I use it to render image frames into video ? I never use metal before

Ответить
@rty65tt40
@rty65tt40 - 20.11.2023 02:26

Hi. How do I set up metal to draw over the previous frame? For example, 1000 fixed triangles of different colors are drawn. And in each new frame, need to change the color of only 10 random triangle. I want to draw 10 triangle with the desired color and draw it on top of the previous frame.

Ответить
@djryanashton
@djryanashton - 22.11.2023 09:49

This is absolutely the best Metal introductory tutorial ever! I was looking for tuts to start getting my head around Metal and all of them went over my head.

This didn't.

Thanks. :)

Ответить
@dimiutube
@dimiutube - 07.01.2024 11:29

Hey!! Very good explanation of the MTL basics! I like the hurry-through-the-code way of presenting. If I don’t understand something, I can stop the video at any point 😊 looking forward to the next episodes 😀

Ответить
@lijieyang2433
@lijieyang2433 - 16.01.2024 08:13

When I am trying to run main.swift, it turns out to show "main/main.swift:31: Fatal error: Unexpectedly found nil while unwrapping an Optional value", do you have any idea why this happens?

Ответить
@bolivarbryan
@bolivarbryan - 22.01.2024 04:23

tried with Kodeko (RW) first, I think this is great as an introduction and then jump back there. Thanks a lot, time is well invested on watching your channel, please keep doing them!

Ответить
@LeoJoseph-el8dt
@LeoJoseph-el8dt - 21.04.2024 05:46

MTLValidateFeatureSupport:6508: failed assertion `Dispatch Threads with Non-Uniform Threadgroup Size is not supported on this device'
When I am trying to run it on the simulator iPhone 15. What could be wrong?

Ответить
@TheZazatv
@TheZazatv - 28.08.2024 15:41

Thank u so much! Metal is suqch lowkey framework and u explained the compute functions very well!

Ответить