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

Partial PDX_SAV_MXF32_XP stores must be flushed to memory #64

Closed
agent-lee opened this issue Oct 29, 2020 · 2 comments
Closed

Partial PDX_SAV_MXF32_XP stores must be flushed to memory #64

agent-lee opened this issue Oct 29, 2020 · 2 comments
Assignees
Labels
high priority missing Expected feature missing (i.e., compiler support lacking)

Comments

@agent-lee
Copy link
Collaborator

The intrinsic that saves to memory works if filling all 16 bytes when called as such:
PDX_SAV_MXF32_XP(v_43, align_c_out, (xb_vecMxf32 *)c_out, 16);
However, when filling less than 16 bytes, it will cause the store to fail and not propagate. So for instance, invoking this instruction by itself will not actually propagate the store to the first word of the memory:
PDX_SAV_MXF32_XP(v_43, align_c_out, (xb_vecMxf32 *)c_out, 4);
The solution is to either add the following flush after the PDX_SAV_MXF32_XP instruction or in the case of writing one word, to just store to the pointer:
PDX_SAPOS_FP(align_c_out, (xb_vec4Mx8 *)c_out); // added after PDX_SAV_MXF32_XP
or
*c_out = ; // just directly save value

Currently the compiler generated kernel does not flush the data out which causes it to produce partially incorrect results because values are not propagated.

@agent-lee agent-lee added missing Expected feature missing (i.e., compiler support lacking) high priority labels Oct 29, 2020
@avanhatt
Copy link
Contributor

Fixing now! Will directly write for one word, and otherwise flush if the final write is unaligned

@avanhatt avanhatt self-assigned this Oct 29, 2020
@agent-lee
Copy link
Collaborator Author

Repro looks good. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
high priority missing Expected feature missing (i.e., compiler support lacking)
Projects
None yet
Development

No branches or pull requests

2 participants