visionOS, bfloat is not supported on this target

Hi, i'm trying to adapt our project to run on visionOS and faced with problem from the topic while running command:

xcrun --sdk xros metal --target=arm64-apple-xros1.0 input.metal -c -o output.air

The full command output looks like that:

While building module 'metal_types' imported from <built-in>:1:
In file included from <built-in>:1:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/metal/ios/lib/clang/32023.98/include/metal/metal_types:90:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/metal/ios/lib/clang/32023.98/include/metal/metal_extended_vector:121:49: error: bfloat is not supported on this target
typedef __attribute__((__ext_vector_type__(2))) bfloat bfloat2;
                                                ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/metal/ios/lib/clang/32023.98/include/metal/metal_extended_vector:122:49: error: bfloat is not supported on this target
typedef __attribute__((__ext_vector_type__(3))) bfloat bfloat3;
                                                ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/metal/ios/lib/clang/32023.98/include/metal/metal_extended_vector:123:49: error: bfloat is not supported on this target
typedef __attribute__((__ext_vector_type__(4))) bfloat bfloat4;
                                                ^
While building module 'metal_types' imported from <built-in>:1:
In file included from <built-in>:1:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/metal/ios/lib/clang/32023.98/include/metal/metal_types:91:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/metal/ios/lib/clang/32023.98/include/metal/metal_packed_vector:121:52: error: bfloat is not supported on this target
typedef __attribute__((__packed_vector_type__(2))) bfloat packed_bfloat2;
                                                   ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/metal/ios/lib/clang/32023.98/include/metal/metal_packed_vector:122:52: error: bfloat is not supported on this target
typedef __attribute__((__packed_vector_type__(3))) bfloat packed_bfloat3;
                                                   ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/metal/ios/lib/clang/32023.98/include/metal/metal_packed_vector:123:52: error: bfloat is not supported on this target
typedef __attribute__((__packed_vector_type__(4))) bfloat packed_bfloat4;

I'm using Xcode 15.2 (15C500b) on MacBook 16 Pro (M1 Pro) and xcrun --sdk xros metal --version gives me this:

Apple metal version 32023.98 (metalfe-32023.98)
Target: air64-apple-darwin23.2.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/metal/ios/bin

Accepted Reply

Can you please try with --target=air64-apple-xros1.0?

  • Seems like it works. Thank you.

Add a Comment

Replies

Can you please try with --target=air64-apple-xros1.0?

  • Seems like it works. Thank you.

Add a Comment