-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Relax package requirements #22
Comments
About M1 hardware: most of Metal.jl already works on Intel hardware, The main difference is that on M1 there's only shared memory, so you don't need to synchronise buffers with Also, on Intel it will be wasteful to default to |
I'd be happy to support Intel or AMD hardware, but I just don't have the hardware (for CI and development) or time. So nothing against it, feel free to pick up that part. |
FYI: On an Intel macOS Monterey (12.X), by changing Sample code:julia> using Metal
julia> Metal.versioninfo()
macOS 12.3.1, Darwin 21.4.0
Toolchain:
- Julia: 1.8.0-rc1
- LLVM: 13.0.1
2 devices:
- Intel(R) UHD Graphics 630 (6.488 MiB allocated)
- AMD Radeon Pro 555X (0 bytes allocated)
julia> a = MtlArray([1])
1-element MtlArray{Int64, 1}:
1
julia> a .+ 1
1-element MtlArray{Int64, 1}:
2
julia> device(a)
MtlDevice:
name: Intel(R) UHD Graphics 630
lowpower: false
headless: true
removable: false
unified memory: true
registry id: 4294969016
transfer rate: 0
julia> task_local_storage()[:MtlDevice] = MtlDevice(2)
MtlDevice:
name: AMD Radeon Pro 555X
lowpower: false
headless: false
removable: false
unified memory: false
registry id: 4294969102
transfer rate: 0
julia> a = MtlArray([1])
1-element MtlArray{Int64, 1}:
1
julia> a .+ 1
1-element MtlArray{Int64, 1}:
0
julia> device(a.+1)
MtlDevice:
name: AMD Radeon Pro 555X
lowpower: false
headless: false
removable: false
unified memory: false
registry id: 4294969102
transfer rate: 0 |
I don't think you even need to do that, it compiles fine on Monterey here (with the availability macro just generating a warning). If I'm understanding ObjC correctly here, this means we're successfully accessing an undocumented property. I also noticed it works correctly, so on #master we are using that, see #23 (comment), so I added a note to the README. |
We now have cmt built on Yggdrasil, and the LLVM back-end supports LLVM 14 (Julia 1.9), so I've updated the README and the issue here. |
I tried Metal.jl on an Intel iMac with an AMD Radeon Pro 5700 XT Sample code:
|
Given how fast these toolchains are moving, I would recommend making 1.9 the min Julia version, and quickly adopting 1.10 as the min when it is out. |
Responding to #458 made me wonder which aspects, if any, we still want to support. 1.10 is now LTS, and I don't think many otherwise-supported devices are running macOS12 or lower. Maybe keep this open for potentially adding hardware support? Although, with Metal 3.2, many features only support Apple Silicon GPUs, and I only predict a higher proportion of new Metal features being Apple Silicon-exclusive in the future. |
That's fair, this is unlikely to happen at this point anymore, so I'm fine just closing this. |
tests fail for me b/c it can't find |
Very strange that Regardless, you have a couple options. You can test the main branch, since #539 is meant to fix that (please open a new issue if you find it doesn't). If you want to test 1.5.1, you can uncomment the compatibility checks at the top of test/runtests.jl, since your device is supported and then initiate the tests. |
Are you considering running in a Docker container on OSX/Apple M2 ?
Docker Engine v27.3.1 In the above configuration, I get, under Julia Version 1.11.3 (2025-01-21):
and the code at that location doesn't look for much detail:
|
@AlainLich If Julia doesn't think it's macOS then we don't support it at the moment. Does the Metal API (without Julia) even work in that container? |
Thanks for your answer, I had not realized that Metal is an Apple product. I will need other/better plans for acceleration on this Mac M2. |
Metal.jl currently requires:
If people are interested in working on this, some of these can be relaxed:
metal_release_13
andmetal_release_14
branches, they'd need to be applied on top ofllvm_release_12
for 1.7 compatibilityThe text was updated successfully, but these errors were encountered: