Skip to content

kernels: use __float2bfloat16 in batched_embed_nvfp4 so strix-hip builds (second break from #195) - #204

Merged
AzeezIsh merged 1 commit into
mainfrom
fix/hip-embed-nvfp4-bf16
Oct 27, 2026
Merged

AzeezIsh merged 1 commit into
mainfrom
fix/hip-embed-nvfp4-bf16

Conversation

@AzeezIsh

Copy link
Copy Markdown
Contributor

What

batched_embed_nvfp4 (added by #195 in kernels/gb10/common/embed_from_argmax.cu) calls __float2bfloat16_rn. HIP has no _rn variant, and this .cu is symlinked into the strix-hip targets, so main stops building for gfx1151. __float2bfloat16 rounds to nearest even on both CUDA and HIP, so the output does not change.

This is the second strix-hip break on main. The first is #174's atlas_pdl.cuh and friends, which #197 fixes. AMD needs both.

The other _rn call sites are only in GB10-only targets. I checked that none of them are symlinked into strix-hip.

Verified

🤖 Generated with Claude Code

embed_from_argmax.cu is shared into kernels/strix-hip/common by symlink.
HIP's bf16 header has no __float2bfloat16_rn, so the HIP build failed with
"use of undeclared identifier". __float2bfloat16 is round-to-nearest-even
on both CUDA and ROCm (static_cast<__bf16>), so GB10 output is unchanged;
line 123 of the same file already uses it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@AzeezIsh

Copy link
Copy Markdown
Contributor Author

AMD train candidate gate: main 504063a + #197 + #204 (merged as b9ab4ed54), on strix (gfx1151, 64 GB):

So #204 together with #197 gives AMD a working main with no accuracy regression. A Flash-Next NVFP4 regression check of #195 on framework is still running.

🤖 Generated with Claude Code

@AzeezIsh

Copy link
Copy Markdown
Contributor Author

Riding integration train #212 (integ/train-2026-10-27, merged --no-ff at this PR's current head). It's being gated on sparky (GB10) now: control vs main, then agentic-webserver 50 + BFCL ST-995 on FP4-Local. The plan is to merge the train once both legs pass and CI shows only the repo-wide reds, which merges this PR. Results will land on #212 and in the campaign log (#211).

@AzeezIsh
AzeezIsh merged commit 0e97fe0 into main Oct 27, 2026
19 of 22 checks passed
AzeezIsh added a commit that referenced this pull request Oct 27, 2026
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.

1 participant