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

Remove superfluous checks for input data in kernel_pop() #673

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

devreal
Copy link
Contributor

@devreal devreal commented Sep 17, 2024

These checks have no relevance and cause problems in TTG because the input data pointers may change.

@devreal devreal requested a review from a team as a code owner September 17, 2024 14:48
@@ -2126,7 +2126,6 @@ parsec_device_kernel_pop( parsec_device_gpu_module_t *gpu_device,
/* We need to manage all data that has been used as input, even if they were read only */

/* Make sure data_in is not NULL */
if( NULL == this_task->data[i].data_in ) continue;
Copy link
Contributor

Choose a reason for hiding this comment

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

In PTG, we use this to detect that this flow is a control flow. Removing this line will probably create an issue with PTGs with control flows...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I removed the line from the PR. I have to check that this doesn't collide with TTG. If it does, I'll open an issue. Should not hold up this PR.

Copy link
Contributor

Choose a reason for hiding this comment

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

I checked the generated code in PTG, and we also initialize data_out to NULL by default. I think you can change this test for

if( NULL == this_task->data[i].data_in && NULL == this_task->data[i].data_out ) continue;

And that should keep the feature of control flows skipping in PTG, while allowing you to send flows that don't have a data_in in TTG.

These checks have no relevance and cause problems in TTG because
the input data pointers may change.

Signed-off-by: Joseph Schuchart <joseph.schuchart@stonybrook.edu>
Copy link
Contributor

@bosilca bosilca left a comment

Choose a reason for hiding this comment

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

You can remove the NULL check (this_task->data[i].data_in == NULL) because it cannot happen due to the if above, but the second part (original == this_task->data[i].data_in->original) is helpful to detect the gpu copy has not been repurposed and attached to another data.

The index i in the data is talking about a particular piece of data, allowing us to understand how it is going in and how it is affected by the kernel. But it talks about the same logical data, potentially different views of the same logical data, which is that having the same original guarantee. Why do you want to reuse an existing data_out for a different copy instead of adding a new flow all ?

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.

3 participants