Metal.jl icon indicating copy to clipboard operation
Metal.jl copied to clipboard

Support for Paravirtualized Graphics for Github Actions CI

Open ViralBShah opened this issue 1 year ago • 5 comments

Since github now has Apple M1 in Github actions and Julia works with it - does it make sense to set up Github Actions CI? I wonder if Metal can be tested through Github Actions. We already do have CI, so not a huge deal, but I thought it was worth asking.

ViralBShah avatar Mar 08 '24 01:03 ViralBShah

Tried it on my fork and it doesn't seem to be working. https://github.com/christiangnrd/Metal.jl/actions/runs/8197868351/job/22420547887

christiangnrd avatar Mar 08 '24 02:03 christiangnrd

Interesting; I guess the Apple Paravirtual device doesn't fully support Metal. Maybe a good first step would be to try and use local virtualization to see if we support that.

maleadt avatar Mar 08 '24 07:03 maleadt

Testing with https://github.com/insidegui/VirtualBuddy.

Custom kernels seem to always result in zeros.

a  = mtl(rand(10))
sum(a)
0.0

Using MPS kernels e.g. for matmul works just fine.

tgymnich avatar Mar 08 '24 13:03 tgymnich

julia> MTL.supports_family(dev, MTL.MTLGPUFamilyApple5)
true

julia> MTL.supports_family(dev, MTL.MTLGPUFamilyApple6)
false

julia> MTL.supports_family(dev, MTL.MTLGPUFamilyMetal3)
false

Looks like the emulated device is significantly below what we require, which is MTLGPUFamilyApple7 + MTLGPUFamilyMetal3.

maleadt avatar Mar 08 '24 15:03 maleadt