Skip to content
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

Segfault when building the following kernel #349

Open
bjourne opened this issue Nov 12, 2024 · 0 comments
Open

Segfault when building the following kernel #349

bjourne opened this issue Nov 12, 2024 · 0 comments

Comments

@bjourne
Copy link

bjourne commented Nov 12, 2024

Compiling and building the following OpenCL program causes the latest version of the OpenCL runtime to crash:

typedef struct {
    uint n_mails;
    uint mails[100];
} mailbox;

__kernel void
run() {
    uint me = get_local_id(0);
    __local mailbox boxes[1][4];
    for (uint ix = 0; ix < 1; ix++) {
        __local mailbox *mb = &boxes[ix][me];
        uint i = 0;
        while (true) {
            uint swap = (i * 2) + 1;
            if (swap >= mb->n_mails) {
                break;
            }
            mb->mails[i] = mb->mails[swap];
            i = swap;
        }
    }
}

Compilation crashes on the following device:

  Name           : Intel(R) Xeon(R) W-2245 CPU @ 3.90GHz
  Version        : OpenCL 3.0 (Build 0)
  Driver         : 2024.18.7.0.11_160000
  C Version      : OpenCL C 3.0 
  Compute units  : 16 
  Global memory  : 33.33 GB
  Max allocation : 16.66 GB
  Max wg. size   : 8 k
  Local mem. size: 32.77 kB
  Max work items : 8192:8192:8192
  Pipe support   : yes
  Compiler usable: yes
  Image support  : yes

But works fine on the following device:

  Name           : Intel(R) Xeon(R) W-2245 CPU @ 3.90GHz
  Version        : OpenCL 3.0 (Build 0)
  Driver         : 2024.17.3.0.08_160000
  C Version      : OpenCL C 3.0 
  Compute units  : 16 
  Global memory  : 33.33 GB
  Max allocation : 16.66 GB
  Max wg. size   : 8 k
  Local mem. size: 32.77 kB
  Max work items : 8192:8192:8192
  Pipe support   : yes
  Compiler usable: yes
  Image support  : yes

So I guess a bug was introduced relatively recently.

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

No branches or pull requests

1 participant