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

Restore POINTER attribute to COPY_DIM_CONTIGUOUS dummy args #20

Merged
merged 1 commit into from
Jan 19, 2024

Conversation

awnawab
Copy link
Collaborator

@awnawab awnawab commented Jan 18, 2024

In v0.2.1 and v0.2.2, the dummy arguments HST,DEV in the COPY_DIM_CONTIGUOUS subroutine had the pointer attribute. This was accidentally removed (apologies!) in the CUDA PR.

Without the POINTER attribute, the runtime reshapes the dummy args so that the LBOUNDS are always 1, rather than the true LBOUNDS of SELF%PTR and SELF%DEVPTR. This doesn't cause any problems in most cases, which explains why this went unnoticed. The only case it fails for is when CHILD%DEVPTR is a discontiguous slice of GANG%DEVPTR and we try and do per-child copies.

Even though we don't plan on introducing per-child copies to the master branch in the near future, I still think this change should be reverted because:

  1. It was introduced by accident
  2. WIthout it, the explicit loops from LBOUNDS(DEV) to UBOUNDS(DEV) are a bit pointless

@pmarguinaud pmarguinaud merged commit 37beb27 into main Jan 19, 2024
2 checks passed
@awnawab awnawab deleted the naan-restore-pointer-attribute branch January 22, 2024 17:29
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