Asahi Linux now works on M1 and has most drivers up and running.
I have changed this post many times as I have failed and learned
I am installing what I call “Versions of the language Julia”
Don’t use julia or julia-bin from the AUR using yay they are not ARM compatible.
Don’t use the M1 ARM from the Julia website because it’s a DMG designed for Macs. It works on the M1 native Mac OS obviously but the two dual booted OSes eat different file types.
I am trying the Linux ARM from the official Julia repo - maybe should have done that first
Sorry for anyone watching this change again and again it’s a fast moving topic
Don’t use the standard Julia from the AUR, it ships with broken dependencies. There’s a julia-bin, which ships the official Julia binaries, if you want a version manager there’s even a juliaup recipe.
From experience speaking, Im not that sophisticated of a user of Julia, most of my use cases are parsing json and simple decision trees. Im very interested in the single thread performance and package compilation time in general but you benchmark whatever you are doing day to day with Julia.
Sharing the comparison table also here for reference:
julia> compare(macos, linux)
29×6 DataFrame
Row │ cat testname units ref_res test_res factor
│ String String String? Any Any Any
─────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
1 │ info SysBenchVer missing 0.4.0-dev 0.4.1 Not Equal
2 │ info JuliaVer missing 1.8.0-DEV.107 1.9.0-DEV.247 Not Equal
3 │ info OS missing macOS (arm64-apple-darwin20.3.0) Linux (aarch64-unknown-linux-gnu) Not Equal
4 │ info CPU missing Apple M1 8 × unknown Not Equal
5 │ info WORD_SIZE missing 64 64 Equal
6 │ info LIBM missing libopenlibm libopenlibm Equal
7 │ info LLVM missing libLLVM-12.0.0 (ORCJIT, cyclone) libLLVM-13.0.1 (ORCJIT, apple-m1) Not Equal
8 │ info GPU missing missing missing Not Equal
9 │ cpu FloatMul ms 9.58e-7 2.375e-6 2.47912
10 │ cpu FusedMulAdd ms 9.58e-7 2.375e-6 2.47912
11 │ cpu FloatSin ms 3.125e-6 5.042e-6 1.61344
12 │ cpu VecMulBroad ms 2.4238716148445335e-5 2.5435742971887548e-5 1.04938
13 │ cpu CPUMatMul ms 0.036708 0.041749 1.13733
14 │ cpu MatMulBroad ms 0.0015 0.0015540999999999999 1.03607
15 │ cpu 3DMulBroad ms 0.0010986687116564418 0.0008053358778625955 0.733011
16 │ cpu peakflops flops 1.3377441768769365e11 1.0614193490591101e11 0.79344
17 │ cpu FFMPEGH264Write ms 239.915708 590.738945 2.46228
18 │ mem DeepCopy ms 0.0001078838174273859 0.00014706105263157895 1.36314
19 │ mem Bandwidth10kB MiB/s 79386.79169776141 75898.86461543928 0.956064
20 │ mem Bandwidth100kB MiB/s 79751.99167137063 48085.22746968436 0.602935
21 │ mem Bandwidth1MB MiB/s 45869.57416219758 38082.99322762759 0.830245
22 │ mem Bandwidth10MB MiB/s 33070.63082466406 31526.632123394204 0.953312
23 │ mem Bandwidth100MB MiB/s 28128.874133576668 27164.814178103377 0.965727
24 │ diskio DiskWrite1KB ms 0.040666 0.016208 0.398564
25 │ diskio DiskWrite1MB ms 0.3977085 0.317458 0.798218
26 │ diskio DiskRead1KB ms 0.008466600000000001 0.0028378888888888885 0.335186
27 │ diskio DiskRead1MB ms 0.472666 0.238375 0.50432
28 │ loading JuliaLoad ms 149.204 77.198681 0.517404
29 │ compilation compilecache ms 217.986708 137.57717 0.631126
CPU benchmarks are for some reasons better on macOS than on Linux, which is quite surprising also because it appears Julia is detecting the CPU features correctly, compute performance shouldn’t in principle depend that much on the operating system. Also memory bandwidth is slightly better on macOS, but closer to Linux compared to the CPU benchmarks. Disk I/O and compilation latency instead favour Linux, but this is probably due to the fact Julia seems to suffer in this area on macOS in general, so this isn’t unexpected.
Overall Julia works pretty well on Asahi Linux, I haven’t played much but I didn’t encounter problems. The operating system instead is pretty unstable (but this is a first alpha version, so it’s ok), brightness control doesn’t work: it’s either 100% or black screen, so just don’t touch it
It is indeed very impressive what they have done with the Asahi Linux and reverse engineering. A little off topic, EU is now forcing companies to open up their ecosystem, sooner or later we will gonna get Julia on iPad too I guess.