Lesson 14 (2019) - Swift: C interop; Protocols; Putting it all together

preview_player
Показать описание

Today's lesson starts with a discussion of the ways that Swift programmers will be able to write high performance GPU code in plain Swift. Chris Lattner discusses kernel fusion, XLA, and MLIR, which are exciting technologies coming soon to Swift programmers.

Then Jeremy talks about something that's available right now: amazingly great C interop. He shows how to use this to quickly and easily get high performance code by interfacing with existing C libraries, using Sox audio processing, and VIPS and OpenCV image processing as complete working examples.

Next up, we implement the Data Block API in Swift! Well... actually in some ways it's even *better* than the original Python version. We take advantage of an enormously powerful Swift feature: *protocols* (aka *type classes*).

We now have enough Swift knowledge to implement a complete fully connect network forward pass in Swift—so that's what we do! Then we start looking at the backward pass, and use Swift's optional *reference semantics* to replicate the PyTorch approach. But then we learn how to do the same thing in a more "Swifty" way, using *value semantics* to do the backward pass in a really concise and flexible manner.

Рекомендации по теме
Комментарии
Автор

What an amazing course. What amazing people!

melonkernel
Автор

I would love a Practical Deep Learning for Coders using Swift!

TheReidNantes