Skip to content

[flang][cuda] Support corner case of data transfer #132451

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

Merged
merged 1 commit into from
Mar 21, 2025

Conversation

clementval
Copy link
Contributor

The flang runtime will complain when the number of elements in the two descriptors involved in the data transfer are not matching.

In some cases, we can still perform the data transfer to match the behavior of the reference compiler.

When the RHS elements count is bigger than the LHS elements count and both descriptors are contiguous, we can perform the data transfer with the bare pointers and the number of bytes from the LHS.

We don't really have unit tests set up for data transfer, this is why I didn't include one here.

Copy link
Contributor

@razvanlupusoru razvanlupusoru left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me. Thank you.

@clementval clementval merged commit ecaef01 into llvm:main Mar 21, 2025
10 checks passed
@clementval clementval deleted the cuf_rt_data_transfer branch March 21, 2025 22:39
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

Successfully merging this pull request may close these issues.

2 participants