Skip to content

[SYCL]subgroup shuffle bug when sg_size=32 #14274

@luoyu-intel

Description

@luoyu-intel

Describe the bug

I'm debugging the SYCL backend of llama.cpp.
I found some kernel output -nan when built with Debug. The root cause is that

sycl::select_from_group(g, x,
		target_offset < logical_sub_group_size
		? start_index + target_offset
		: id);

this returns nan when local_id is larger than 16.
I can also reproduce this by using sg.shuffle:
tmp += sg.shuffle(x, i); when i > 16, the result of shuffle is nan. But they both work fine with Release build.

To reproduce

  1. checkout llama.cpp: https://github.com/ggerganov/llama.cpp
  2. built with SYCL debug config
  3. run inference.

Environment

Windows 11
Intel Arc770
Intel(R) oneAPI DPC++/C++ Compiler 2024.1.0 (2024.1.0.20240308)
Target: x86_64-pc-windows-msvc
Thread model: posix

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions