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

"Unsupported constant int size: 5 bytes" #204

Open
athas opened this issue Sep 16, 2022 · 2 comments
Open

"Unsupported constant int size: 5 bytes" #204

athas opened this issue Sep 16, 2022 · 2 comments

Comments

@athas
Copy link

athas commented Sep 16, 2022

I'm getting this error on Oclgrind 21.10 with rather simple kernels, e.g. this one:

__kernel void mainzisegred_nonseg_6074(int n_6034, int num_threads_6087, __global int *segred_tmp_mem_6085)
{
    int global_tid_6088 = get_global_id(0);
    int x_acc_6097 = 0;
    for (int i_6102 = 0; i_6102 < n_6034; i_6102++) {
      x_acc_6097 = x_acc_6097 + get_global_id(0) + num_threads_6087 * i_6102;
    }
    segred_tmp_mem_6085[0] = x_acc_6097;
}

This is a contrived kernel derived from a much larger example. Interestingly, the original kernel triggered a complaint about the constant being 9 bytes.

I'm not sure whether this is a compatibility problem with the wrong version of LLVM. It happens with the Oclgrind packaged in Ubuntu 21.04, but I am not sure which LLVM it is linked against.

@athas
Copy link
Author

athas commented Sep 16, 2022

Through bisection I have confirmed that 16a4f20 is the commit that introduces this bug.

@athas
Copy link
Author

athas commented Sep 16, 2022

As a workaround, I can pass -O1 as an OpenCL build option. It seems to only be -Oz that produces these interesting constants.

athas added a commit to diku-dk/futhark that referenced this issue Sep 16, 2022
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