-
Notifications
You must be signed in to change notification settings - Fork 128
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
Update the memory selection layout when there is a layout mismatch #4346
Conversation
Hello Ana, thank you for your help. Unfortunately, the reproducer linked in this comment still produces this file for me, even with this PR:
I will try this on other systems next week, since you report that you cannot reproduce this. |
6f5c639
to
f517038
Compare
Ok, so two things I notice when I look at your code:
I really think your issue now is a layout mismatch. CudaMemCpy doesn't reorganize data so you'll have the same data but we access it differently depending on if it's on the CPU and GPU. I can talk later today on teams if you want |
Correct, this is the reason why I want to use a memory selection here in the first place. I output four variables in order to verify that this runs as I expect:
I'll try that next week. Since you mention that you access CPU/GPU data differently, even when it has the same layout as in this case, this seems like I need to know some special tricks to output padded GPU data with memory selections? |
f517038
to
eaf81d9
Compare
eaf81d9
to
b359e73
Compare
b359e73
to
04aac83
Compare
Update the memory selection layout when there is a layout mismatch (cherry picked from commit 24c3860)
Update the memory selection layout when there is a layout mismatch (cherry picked from commit 24c3860)
Update the memory selection layout when there is a layout mismatch (cherry picked from commit 24c3860)
Update the memory selection layout when there is a layout mismatch (cherry picked from commit 24c3860)
Update the memory selection layout when there is a layout mismatch (cherry picked from commit 24c3860)
Update the memory selection layout when there is a layout mismatch (cherry picked from commit 24c3860)
Update the memory selection layout when there is a layout mismatch (cherry picked from commit 24c3860)
* release_210: (33 commits) Bump version to v2.10.2 Merge pull request #4379 from vicentebolea/increace-cmake-version-dep-blosc Fix missing int64_t definition (#4365) Merge pull request #4346 from anagainaru/memSelLayout Merge pull request #4343 from anagainaru/gpuSpan Compress the lossless part of MGARD data with Zstd. It was uncompressed until now. (#4339) Fix an issue when reading blocks in streaming mode, when some producers did not write any block to output. (#4332) Fix in python API: (#4331) Merge pull request #4303 from anagainaru/build-frontier Merge pull request #4293 from anagainaru/check_parser_lexer Derived variables of type StoreData should not record the expression string (#4247) Update ReadMe.md (#4243) Switch from ROCM_VERSION_MAJOR to HIP_VERSION_MAJOR (#4222) Merge pull request #4207 from anagainaru/hide-symbols Patch for when both xrootd and derived variables are activated (#4200) Add defines for BP3, BP4 and BP5 (#4191) Overload NdCopy instead of adding a new argument for the 2.10 release Revert "Backport #3759 to Release 2.10 branch. (cherry-picked from master branch #4340) (#4341)" Revert "Merge pull request #4189 from pnorbert/campaign-s3-support" ci,python: enable python win2022 serial build ...
Since we set the memory space after we set all the variable shapes and selections, the memory selection needs to be updated together with the variable shape.
The
SetMemorySpace
call was updating the shape, start and count but not the memory selection.@franzpoeschel this is why your code was writing the wrong data for your 2D array. Could you please double check?