Skip to content

Conversation

@wenju-he
Copy link
Contributor

No description provided.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds two Clang patches to enable and enhance BFloat16 support for SPIR/SPIR-V targets. The first patch upgrades __bf16 from a storage-only type to a full arithmetic type with updated mangling and excess precision support. The second patch enables BFloat16 specifically for SPIR/SPIR-V targets by setting the appropriate target configuration.

Key changes:

  • Upgrade __bf16 to arithmetic type with new mangling scheme (DF16b)
  • Remove restrictions on BFloat16 type casting and vector operations
  • Enable BFloat16 support for SPIR/SPIR-V targets with proper width, alignment, and format configuration

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
patches/clang/0008-Clang-BFloat16-Upgrade-__bf16-to-arithmetic-type-cha.patch Implements the core BFloat16 arithmetic type upgrade, removes casting restrictions, and updates type conversion logic
patches/clang/0009-Clang-Enable-BFloat16-for-SPIR-SPIR-V.patch Configures SPIR/SPIR-V target to support BFloat16 with appropriate width, alignment, and format settings

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

+ }
+
+ /// Determine whether the BFloat type is fully supported on this target, i.e
+ /// arithemtic operations.
Copy link

Copilot AI Nov 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corrected spelling of 'arithemtic' to 'arithmetic'.

Suggested change
+ /// arithemtic operations.
+ /// arithmetic operations.

Copilot uses AI. Check for mistakes.
@wenju-he wenju-he merged commit b8cd348 into intel:ocl-open-140 Nov 21, 2025
1 check passed
@wenju-he wenju-he deleted the add-clang-bf16-patches-140 branch November 21, 2025 05:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants