# Getting started with Metal.jl

**URL:** <https://discourse.julialang.org/t/getting-started-with-metal-jl/116309>\
**Category:** Performance\
**Tags:** gpu, metaljl\
**Created:** [June 27, 2024, 2:02pm UTC](https://discourse.julialang.org/t/getting-started-with-metal-jl/116309 "2024-06-27T14:02:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![marianoarnaiz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/marianoarnaiz/32/19377_2.png) [@marianoarnaiz](https://discourse.julialang.org/u/marianoarnaiz)\
**Post date:** [June 27, 2024, 2:02pm UTC](https://discourse.julialang.org/t/getting-started-with-metal-jl/116309/1 "2024-06-27T14:02:49Z")

</div>

Hi everyone.  
So, I have never worked with GPU, I have a M1 Mac and I am trying to get some codes of mine to run faster. I have a code that I know very well and I thought it might be a good exercise to translate it to Metal.jl. Unfortunately I am not getting very lucky at doing for loops, if statements etc with the MetalArrays.

Anyone has some examples (beyond the Metal.jl Docs) or a tutorial for a GPU newbie.

Kind regards to all.  
M.

---

<div class="post-metadata">

**Author:** ![maleadt](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/maleadt/32/10097_2.png) [@maleadt](https://discourse.julialang.org/u/maleadt)\
**Post date:** [June 28, 2024, 10:48am UTC](https://discourse.julialang.org/t/getting-started-with-metal-jl/116309/2 "2024-06-28T10:48:11Z")

</div>

Please be more specific and show an example of what isn’t working. It’s unclear to me if you’re trying to use array operations, or trying to write a kernel. In any case, you can look at the docs/examples of e.g. CUDA.jl, which is similar to Metal.jl.
