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

Pr/enable batched tests #1453

Merged

Conversation

AlexMWells
Copy link
Contributor

@AlexMWells AlexMWells commented Jan 12, 2022

Description

Enable BATCHED execution of most testsuite entries that don't use closures or point cloud.
Ran into missing hash function, and behavior differences between batched and scalar execution which this PR fixes:

Added batched implementation of hash function.

Updated batched implementation to use the symbol.get_int(), symbol.get_float(), and symbol.get_string() methods vs. (int)symbol.data() approach.

Fixed bug in batched code gen where mangled symbol names were output as part of debug uninit warnings and range checking.

Updated batched behavior for unlocked geom shader output parameters to function, like scalar version.
Fixed batched bug when non-entry layers are executed and execution masks are compared producing a instead of i1 for use in conditional operation.

Enabled command line assignable user data for batched execution in testshade, which fixes testsuite/userdata-passthrough

Changed print_outputs for batched execution to not use << operator which includes parenthesis, but instead output each componenet with spaces to match the non-batched print_outputs.

renamed MaskedData<...>::assign_from(void* ptr_wide_data) to assign_val_from(const void* ptr_wide_data) to better reflect that only the value is assigned, and Dx and Dy are NOT assigned.
Added MaskedData<...>::assign_all_from(const void* ptr_data) to take a scalar DataT and broadcast it to all lanes of the MaskedData, masked off lanes are NOT overwritten, and value, Dx, Dy are assigned.

Tests

Enable BATCHED execution of all testsuite entries that don't use closures or point cloud.
Added more reparameter test cases to cover arrays and arrays of aggregate types.
Wrapped all printf arguments with pretty() in testsuite/geomath/test.osl to avoid small floating point differences from affecting printed results in test.

Checklist:

  • I have read the contribution guidelines.
  • I have previously submitted a Contributor License Agreement.
  • I have updated the documentation, if applicable.
  • I have ensured that the change is tested somewhere in the testsuite (adding new test cases if necessary).
  • My code follows the prevailing code style of this project.

…sures or point cloud.

Added batched implementation of hash function.

Updated batched implementation to use the symbol.get_int(), symbol.get_float(), and symbol.get_string() methods vs. *(int*)symbol.data() approach.

Fixed bug in batched code gen where mangled symbol names were output as part of debug uninit warnings and range checking.

Signed-off-by: Alex M. Wells <[email protected]>
Updated batched behavior for unlocked geom shader output parameters to function like scalar version.
Fixed batched bug when non-entry layers are executed and execution masks are compared producing a <i1x16> instead of i1 for use in conditional operation.

Added more reparameter test cases to cover arrays and arrays of aggregate types.

Signed-off-by: Alex M. Wells <[email protected]>
…stshade, which fixes testsuite/userdata-passthrough

Changed print_outputs for batched execution to not use << operator which includes parenthesis, but instead output each componenet with spaces to match the non-batched print_outputs.

renamed MaskedData<...>::assign_from(void* ptr_wide_data) to assign_val_from(const void* ptr_wide_data) to better reflect that only the value is assigned, and Dx and Dy are NOT assigned.
Added MaskedData<...>::assign_all_from(const void* ptr_data) to take a scalar DataT and broadcast it to all lanes of the MaskedData, masked off lanes are NOT overwritten, and value, Dx, Dy are assigned.

Signed-off-by: Alex M. Wells <[email protected]>
Add some paranetheses to conditional to avoid warning.

Signed-off-by: Alex M. Wells <[email protected]>
…osl to avoid small floating point differences from affecting printed results in test.

Signed-off-by: Alex M. Wells <[email protected]>
…int differences with some compiler/platform combinations.

Signed-off-by: Alex M. Wells <[email protected]>
@AlexMWells AlexMWells requested a review from lgritz January 12, 2022 21:37
Copy link
Collaborator

@lgritz lgritz left a comment

Choose a reason for hiding this comment

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

LGTM, and Alex and I went over it in detail on a conf call.

@lgritz lgritz merged commit 7baa293 into AcademySoftwareFoundation:main Jan 13, 2022
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