Skip to content

Set up Mac builds with clang >= 17 even though Xcode only has at most clang 16 #143913

Open
@swolchok

Description

@swolchok

🚀 The feature, motivation and pitch

This would enable a couple disparate improvements:

  1. Our binary releases should include the latest compiler features and optimizations. The concrete motivating example is that the compiler used for Mac wheels apparently doesn't pass COMPILER_SUPPORTS_BF16_TARGET (i.e., clang version greater than 15), which causes a slower bfloat16 gemv kernel to be used.
  2. We should have test coverage for CPU bfloat16 support on Mac (We don't have test coverage for aarch64 (ARM64) bfloat16 feature (__ARM_FEATURE_BF16) #142703) -- clang 16 purports to be able to build it, but is buggy and we actually need 17+.

Alternatives

do nothing until Apple gets around to releasing an Xcode with clang 17 or later and we get around to updating to it.

Additional context

Xcode clang version history: https://gist.github.com/yamaya/2924292 . Latest at time of writing is Xcode 16.2 with Apple clang version 16.0.0 (clang-1600.0.26.6)

cc @seemethere @malfet @osalpekar @atalman @pytorch/pytorch-dev-infra

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNot as big of a feature, but technically not a bug. Should be easy to fixmodule: binariesAnything related to official binaries that we release to usersmodule: ciRelated to continuous integrationtriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate module

    Type

    No type

    Projects

    Status

    Cold Storage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions