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

Sid: dimension to tuple like #1750

Merged
merged 35 commits into from
Apr 20, 2023

Conversation

havogt
Copy link
Contributor

@havogt havogt commented Apr 5, 2023

Adds a sid transformations utility which translates a sid with dimension D and element type T to a sid with D removed and type is tuple<T> like, with tuple_size N for sid::dimension_to_tuple_like<D, N>(sid).

Additional:

  • new regression test for performance comparison of different kinds of tuple-likes

@havogt
Copy link
Contributor Author

havogt commented Apr 5, 2023

launch jenkins

@havogt
Copy link
Contributor Author

havogt commented Apr 5, 2023

launch perftests

@havogt
Copy link
Contributor Author

havogt commented Apr 5, 2023

launch perftests

@havogt
Copy link
Contributor Author

havogt commented Apr 6, 2023

launch jenkins

@havogt
Copy link
Contributor Author

havogt commented Apr 6, 2023

launch perftests

@havogt havogt requested a review from fthaler April 6, 2023 06:47
@havogt
Copy link
Contributor Author

havogt commented Apr 6, 2023

launch jenkins

@havogt
Copy link
Contributor Author

havogt commented Apr 6, 2023

launch perftests

GT_REGRESSION_TEST(copy_stencil_tuple_tuple, test_environment<>, stencil_backend_t) {
// expected to perform bad on GPU because array of structures
using float_t = typename TypeParam::float_t;
auto in = [](int i, int j, int k) { return tuple{i + j + k, i + j + k + 1, i + j + k + 2, i + j + k + 3}; };
Copy link
Contributor Author

Choose a reason for hiding this comment

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

  • try array
  • then use 5 elements (because 4 floats should be a single load in cuda)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm. Performance is bad for array<float,4>, too. No idea why this is not translated to a float4 load.

include/gridtools/sid/dimension_to_tuple_like.hpp Outdated Show resolved Hide resolved
tests/include/test_environment.hpp Outdated Show resolved Hide resolved
tests/include/verifier.hpp Outdated Show resolved Hide resolved
tests/regression/copy_stencil_tuple.cpp Show resolved Hide resolved
tests/regression/copy_stencil_tuple.cpp Outdated Show resolved Hide resolved
tests/regression/copy_stencil_tuple.cpp Outdated Show resolved Hide resolved
@havogt
Copy link
Contributor Author

havogt commented Apr 12, 2023

launch perftests

@havogt
Copy link
Contributor Author

havogt commented Apr 12, 2023

launch perftests

@havogt
Copy link
Contributor Author

havogt commented Apr 12, 2023

launch perftests

@havogt
Copy link
Contributor Author

havogt commented Apr 14, 2023

launch jenkins

@havogt
Copy link
Contributor Author

havogt commented Apr 14, 2023

launch perftests

include/gridtools/sid/composite.hpp Outdated Show resolved Hide resolved
tests/include/test_environment.hpp Outdated Show resolved Hide resolved
@havogt
Copy link
Contributor Author

havogt commented Apr 20, 2023

launch jenkins

@havogt
Copy link
Contributor Author

havogt commented Apr 20, 2023

launch perftests

@havogt havogt requested a review from fthaler April 20, 2023 11:36
@havogt
Copy link
Contributor Author

havogt commented Apr 20, 2023

launch jenkins

@havogt
Copy link
Contributor Author

havogt commented Apr 20, 2023

launch perftests

@havogt
Copy link
Contributor Author

havogt commented Apr 20, 2023

launch jenkins

@havogt havogt merged commit e19411f into GridTools:master Apr 20, 2023
@havogt havogt deleted the sid_dimension_to_tuple_like branch April 20, 2023 13:01
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