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

Alignment for LD/ST instructions may exceed HSAIL limit (BRIG_ALIGNMENT_256) #28

Open
enigmastudio opened this issue May 10, 2016 · 0 comments

Comments

@enigmastudio
Copy link

I'm on the latest HLC compiler from the branch hsail-stable-3.7. I compiled with -O2.

The following kernel doesn't assemble after compilation, because the alignment info generated by the code generator can exceed HSAIL's limit of BRIG_ALIGNMENT_256:

__kernel void Bug(size_t index)
{
    __global uint *ptr = (__global uint *)(index*512);
    *ptr = 0xdeadc0de;
}

The emitted error is:

>   st_global_align(512)_u32    3735929054, [$d0];
>                   ^
input(16,18): Invalid alignment

ERROR:  The following command failed with return code 1.
        HSAILasm -o /tmp/hsa_finalizer-qVC9u8/temp.hsail /tmp/cloc31620/temp.hsail

I think all that needs to be done is to limit the alignment info produced by the code generator to BRIG_ALIGNMENT_256.

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