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

Decouple device flow count from parameters #722

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

Conversation

devreal
Copy link
Contributor

@devreal devreal commented Dec 23, 2024

Make PARSEC_MAX_DEVICE_FLOWS configurable and select a proper integer type, up to int128_t. Make sure the flow mask is properly checked.

This is an attempt at allowing an increase of the number of device inputs up to 128. The use of 128bit integers for flows requires proper handling of integer types so this PR introduces parsec_flow_mask_t and provides macros to set and test the flow mask.

Related: #694 where the flows are separated out of the gpu task structure.

@devreal devreal requested a review from a team as a code owner December 23, 2024 18:07
@@ -160,6 +160,24 @@ typedef int32_t parsec_dependency_t;
typedef int32_t parsec_dependency_t;
#endif

#if ((MAX_PARAM_COUNT <= 128) || (PARSEC_MAX_DEVICE_FLOWS <= 128)) && defined(PARSEC_HAVE_INT128)
Copy link
Contributor

Choose a reason for hiding this comment

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

shouldn't this #if #elif sequence be in the reverse order so as to select the tightest possible representation (i.e., prefer 16 bits if the value is set to 16?)

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 reversed the order in which we choose the type so we pick the smallest possible type.

@@ -160,6 +160,24 @@ typedef int32_t parsec_dependency_t;
typedef int32_t parsec_dependency_t;
#endif

#if ((MAX_PARAM_COUNT <= 16) || (PARSEC_MAX_DEVICE_FLOWS <= 16))
Copy link
Contributor

Choose a reason for hiding this comment

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

Should be &&, we don't expect MAX_DEVICE_FLOW < MAX_PARAM_COUNT to be correct.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch, fixed 👍

Make PARSEC_MAX_DEVICE_FLOWS configurable and select a proper integer
type, up to int128_t. Make sure the flow mask is properly checked.


Signed-off-by: Joseph Schuchart <[email protected]>
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