Skip to content

Conversation

@yingying0906
Copy link
Contributor

When running FLUX2 models in stable-diffusion.cpp on Intel GPU with oneAPI SYCL backend, this assertion fails:

ggml-sycl.cpp:2047: GGML_ASSERT(to_fp32_sycl != nullptr) failed

The issue is that ggml_get_to_fp32_sycl(), ggml_get_to_fp16_sycl(), and get_to_fp16_nc_sycl() are missing BF16 conversion cases, causing them to return nullptr.

This PR adds the missing BF16 support in ggml/src/ggml-sycl/convert.cpp. Uses sycl::ext::oneapi::bfloat16 (Intel oneAPI only, guarded by __INTEL_LLVM_COMPILER).

@github-actions github-actions bot added ggml changes relating to the ggml tensor library for machine learning SYCL https://en.wikipedia.org/wiki/SYCL - GPU programming language labels Dec 5, 2025
Copy link
Collaborator

@NeoZhangJianyu NeoZhangJianyu left a comment

Choose a reason for hiding this comment

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

Good job!

Thank you for your support!

@NeoZhangJianyu
Copy link
Collaborator

@yingying0906
SYCL backend has support 4GB+ tensor.
It could fix the same issue of statble-diffusion.cpp: output 1024*1024 will meet it.

You could cherry-pick this PR #17566.

Thank you!

@NeoZhangJianyu
Copy link
Collaborator

@yingying0906
Please fix the format issue in the code.

@NeoZhangJianyu NeoZhangJianyu merged commit d9e03db into ggml-org:master Dec 7, 2025
77 of 78 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ggml changes relating to the ggml tensor library for machine learning SYCL https://en.wikipedia.org/wiki/SYCL - GPU programming language

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants