Skip to content

Implement GL_EXT_bfloat16 #3905

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 11, 2025
Merged

Conversation

jeffbolznv
Copy link
Contributor

@jeffbolznv jeffbolznv commented Mar 24, 2025

Edit: spirv-tools has landed, this is ready for review.

Spec is at KhronosGroup/GLSL#279

@jeffbolznv jeffbolznv changed the title Draft: Implement GL_EXT_bfloat16 Implement GL_EXT_bfloat16 Apr 9, 2025
@jeffbolznv
Copy link
Contributor Author

The spirv-tools support has landed. I've rebased and updated the deps, this is ready for review now. Ping @jeremy-lunarg @arcady-lunarg.

@arcady-lunarg arcady-lunarg self-requested a review April 10, 2025 15:11
addExtension(spv::E_SPV_KHR_bfloat16);
addCapability(CapabilityBFloat16TypeKHR);

#if 0
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there any plan to add the necessary support to the debuginfo spec? Also, have you tested this extension with debuginfo enabled to make sure it at least successfully fails to emit debuginfo?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't personally have any plans to do a followon debuginfo extension. It seems like it wasn't made extensible enough to support new types it didn't foresee. I tried running the bfloat16 unit test with debuginfo and it asserts here:

Id Builder::makeDebugFunctionType(Id returnType, const std::vector<Id>& paramTypes)
{
    assert(debugId[returnType] != 0);

So, yeah, debuginfo may not work. But I'm not sure what to do about it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I should add - that test did run to completion (in release), generates code, but that code fails validation.

Copy link
Contributor

Choose a reason for hiding this comment

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

In the interests of getting this done, I would say it's okay to not deal with debuginfo for now and open a glslang issue for the assertion failure.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK, I filed #3925 about this.

Copy link
Contributor

@arcady-lunarg arcady-lunarg left a comment

Choose a reason for hiding this comment

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

LGTM

@arcady-lunarg arcady-lunarg merged commit ba16404 into KhronosGroup:main Apr 11, 2025
30 checks passed
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