(Mis)Understanding Metal

updated 9 months ago; latest suggestion 9 months ago

Abstract

In this talk, I'll explain how the GPU works on iOS devices through my initial misunderstandings of Metal. Having a grasp of these lower level concepts will be useful to you, even if you never use Metal directly in your day to day development.

Prologue

Metal is a GPU Programming Framework for iOS and macOS. When Apple announced it, they claimed that it would be 10x faster than OpenGL!

At the time, I just (mis)understood it as "something that was blazing fast". To try it out, I created a Metal wrapper class which can render an image as easy as UIImageView but which is backed by Metal.

Then, I compared the performance to UIImageView. As it would turn out, my Metal wrapper was blazingly slower than UIImageView!

Why? What did I misunderstand?

Agenda

  • What is GPU? How does it work in the iOS rendering system?
  • Basic concepts of Metal
    • How to simply understand the Metal implementation which looks very complicated at the first impression
  • Where to pay attention when optimizing the performance of CPU and GPU

What you can learn

Even if you do NOT use Metal directly, your app is implicitly benefitting from GPU. This talk will lead you to be conscious of the GPU layer that we usually miss.

Suggestions

  • 8f060d3e981416a538d31896c2040ba09bb64443?size=100x100 8f060d3e981416a538d31896c2040ba09bb64443 suggests 9 months ago

    This is cool, and it has all elements that suggest an entertaining talk: learning from mistakes, explanation of the architecture and valuable hints for usage of this technology. Personally I wonder if use Metal as a coprocessor for non-graphic computations could be addressed? This might perhaps excite the poor chap who won't use Metal in his App.

  • The proposal author responds 9 months ago

    Thanks for the suggestion. I added a new paragraph in which explaining what the audiences can learn from this talk.

  • 8b2f2d3e6553c2b4048b93300959895ab76b4154?size=100x100 8b2f2d3e6553c2b4048b93300959895ab76b4154 suggests 10 months ago

    What should attendees take away from this talk? I don't expect to use Metal in my apps, why would I be excited to see this talk?

    (I mean, Metal is cool and all, but what might I learn?)