8000 Clip: Fix cellOffset increment by spyridon97 · Pull Request #104 · Viskores/viskores · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Clip: Fix cellOffset increment #104

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 4 commits into from
May 29, 2025

Conversation

spyridon97
Copy link
Collaborator

There was bug in the newly redesigned Clip filter that caused the cellOffset to not be incremented,
cause output cells to be incorrectly placed in the output. This has now been fixed, and the output.

Additionally, all resources are released as soon as possible.

Finally, the ScanExclusive usages within the Clip filter have been improved to operate
only on the batches of points/cells that are actually needed, rather than the entire batch data.

In GenerateCellSet, if the cell was kept, we forgot to increment the cellOffset,
which lead to writing the types and offsets at the wrong memory location.

We also made sure that all offset increments are correct and documented.
ScanExclusive can only be executed only on filled batches
instead of all batches, using the output to input map
from mask select
@spyridon97 spyridon97 requested a review from kmorel as a code owner May 23, 2025 07:53
@spyridon97
Copy link
Collaborator Author

The ScanExclusive changes are currently tested on Frontier to check if they are useful or not.

Copy link
Collaborator
@kmorel kmorel left a comment

Choose a reason for hiding this comment

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

Looks good assuming the CI passes.

Did you diagnose why the indexing error did not show up as missing cells in the testing output?

@spyridon97
Copy link
Collaborator Author
spyridon97 commented May 25, 2025

Old Data is plain ScanExclusive , New Data is ScanExclusive using MaskSelect's Output to Input array:
I trimmed batches of size less than4 since we won't consider them, and this way we will get a better scale.

F-15: 246,056,538 cells, 116,414,075 points

Old-BatchPointData-ScanExclusive New-BatchPointData-ScanExclusive
F-15_03_point-data-scan-exclusive F-15_03_point-data-scan-exclusive
Old-BatchCellData-ScanExclusive New-BatchCellData-ScanExclusive
F-15_09_cell-data-scan-exclusive F-15_09_cell-data-scan-exclusive

JSM-tet: 299,608,989 cells, 50,429,916 points

Old-BatchPointData-ScanExclusive New-BatchPointData-ScanExclusive
JSM-tet_03_point-data-scan-exclusive JSM-tet_03_point-data-scan-exclusive
Old-BatchCellData-ScanExclusive New-BatchCellData-ScanExclusive
JSM-tet_09_cell-data-scan-exclusive JSM-tet_09_cell-data-scan-exclusive

Based on the figures i see here: The highest time remained pretty much the same, the average dropped, and the minimum is ROCK bottom as expected. I feel like we should integrate these changes. What do you think?

@spyridon97
Copy link
Collaborator Author
spyridon97 commented May 27, 2025

@kmorel the indexing failure was not caught because the UnitTestClipWithFieldFilter.cxx/UnitTestClipWithImplicitFunctionFilter.cxx check only for the number of cells/points/fields, and some scalar values. They don't check cell types or offsets.

@kmorel
Copy link
Collaborator
kmorel commented May 28, 2025

@kmorel the indexing failure was not caught because the UnitTestClipWithFieldFilter.cxx/UnitTestClipWithImplicitFunctionFilter.cxx check only for the number of cells/points/fields, and some scalar values. They don't check cell types or offsets.

That makes sense. I was just surprised this didn't show up in any renderings. The Ascent folks used the clip in their renderings and didn't see missing or malformed cells.

@kmorel
Copy link
Collaborator
kmorel commented May 28, 2025

@spyridon97 Does GitHub give you permissions to merge this PR, or do I need to do it?

@spyridon97
Copy link
Collaborator Author

@kmorel kmorel merged commit fe7b24b into Viskores:main May 29, 2025
9 of 10 checks passed
@kmorel
Copy link
Collaborator
kmorel commented May 29, 2025

You're not authorized to push to this branch.

That's fine. I merged this.

@spyridon97
Copy link
Collaborator Author

I think i was given Triage rights when you invited me to the project.

@kmorel
Copy link
Collaborator
kmorel commented May 29, 2025

I think i was given Triage rights when you invited me to the project.

That is correct. With the added formality of the charter document with the LF, I'm trying to limit the number of people with write access. I just wasn't sure if GitHub allowed you to merge a PR once all the requirements are met. I guess you need permission to write to protected branches for that.

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
0