Skip to content

Conversation

@clementval
Copy link
Contributor

When the two descriptor have the same number of elements and are contiguous, the transfer can be done via pointers.

@clementval clementval requested a review from wangzpgi July 11, 2025 22:07
// triggered in the Assign runtime function used for the main case below.
if (!srcDesc->IsContiguous() || !dstDesc->IsContiguous())
terminator.Crash("Unsupported data transfer: mismatching element counts "
"with non-contiguous arrays");
Copy link
Contributor

Choose a reason for hiding this comment

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

Is my understanding correct that both new and old version achieve the same goal of only allowing contiguous arrays for the data transfer, but the old version gives an error message about unsupported data transfer?

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah! I see there is a difference between <= and <. Didn't notice it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah and the new version fall back on the runtime assign function instead of giving an error.

@clementval clementval merged commit f642b63 into llvm:main Jul 11, 2025
10 checks passed
@clementval clementval deleted the cuf_mem_ptr branch July 11, 2025 22:32
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