macOS Tahoe Beta 4 disabled __asm keyword for Metal

Hi, developers,

I maintain a shipped app that uses string concatenation to construct Metal shader and compile on-device. Beta 4 seems disabled __asm keyword, resulting the compilation failure.

The error is:

v2/GEMMKernel.cpp:229: error: program_source:23:9: error: illegal string literal in 'asm'
  __asm("air.simdgroup_async_copy_1d.p3i8.p1i8");

The relevant code is available at https://github.com/liuliu/ccv/blob/unstable/lib/nnc/mfa/v2/GEMMHeaders.cpp#L30 although any __asm will trip this.

Please give us guidance on whether this is a regression or this will be something enforced in 26 release. Personally, I would consider this as a bug given it won't impact anything "compiled" shaders.

Thanks for your patience reading this!

Answered by DTS Engineer in 851423022

Confirming that it's no longer possible to use __asm with AIR.

The change is intentional and not a bug.

That said, you'll need to use conventional API and AIR compilation moving forwards.

I am wondering if in the future beta version, setting Metal language version would allow us to bypass this (currently it doesn't).

Hello,

Given "... any __asm will trip this." this appears to be a more general question about support for inline assembly in Xcode 26.

Is that accurate?

Confirming that it's no longer possible to use __asm with AIR.

The change is intentional and not a bug.

That said, you'll need to use conventional API and AIR compilation moving forwards.

OK. It is a much more involved refactoring then. Any suggested workaround?

macOS Tahoe Beta 4 disabled __asm keyword for Metal
 
 
Q