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

Introduce ldg_ptr to Enable __ldg in Data Stores and simple_ptr_holder #1802

Merged
merged 17 commits into from
Sep 24, 2024

Conversation

fthaler
Copy link
Contributor

@fthaler fthaler commented Aug 14, 2024

Enables LDG loads for data stores with const data type and for neighbor tables. Shows performance improvements of up to 12% using NVCC and SID composites or dim2tuple on smaller domains. Using Clang, up to 70% performance improvements can be observed in these cases.

@fthaler
Copy link
Contributor Author

fthaler commented Aug 14, 2024

launch perftest

@gridtoolsjenkins
Copy link
Collaborator

Hi there, this is jenkins continuous integration...
Do you want me to verify this patch?

@fthaler
Copy link
Contributor Author

fthaler commented Aug 14, 2024

launch jenkins

@fthaler fthaler requested a review from havogt August 14, 2024 09:49

template <class T>
GT_FUNCTION constexpr T &&as_ldg_ptr(T &&value) {
return std::forward<T>(value);
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure I like this fallback. Doesn't it mean that if you wrap any pointer ad "ldg" pointer, which is not "ldg"-capable, it will silently do that. If this is the intent, then at least I don't like the naming.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It doesn’t wrap anything, it just passes unsupported types through as is. We just call this function wherever we would like to use LDG when available. The name might be improvable though, so let me know if you have a better one …

@fthaler
Copy link
Contributor Author

fthaler commented Aug 26, 2024

launch jenkins

@fthaler
Copy link
Contributor Author

fthaler commented Aug 26, 2024

launch jenkins

Copy link
Contributor

@havogt havogt left a comment

Choose a reason for hiding this comment

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

made these comments earlier, but didn't commit it seems. feel free to ignore...

tests/unit_tests/common/test_ldg_ptr.cu Show resolved Hide resolved
tests/unit_tests/common/test_ldg_ptr.cu Show resolved Hide resolved
include/gridtools/sid/simple_ptr_holder.hpp Outdated Show resolved Hide resolved
@fthaler
Copy link
Contributor Author

fthaler commented Aug 26, 2024

launch perftest

@fthaler
Copy link
Contributor Author

fthaler commented Aug 27, 2024

launch perftest

@fthaler
Copy link
Contributor Author

fthaler commented Aug 27, 2024

launch jenkins

@fthaler
Copy link
Contributor Author

fthaler commented Aug 27, 2024

launch perftest

1 similar comment
@fthaler
Copy link
Contributor Author

fthaler commented Sep 24, 2024

launch perftest

Copy link
Contributor

@havogt havogt left a comment

Choose a reason for hiding this comment

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

lgtm

@fthaler fthaler merged commit 12ca60f into GridTools:master Sep 24, 2024
68 checks passed
@fthaler fthaler deleted the ldg-ptr branch September 24, 2024 13:46
havogt pushed a commit that referenced this pull request Sep 30, 2024
#1802)

Enables LDG loads for data stores with const data type and for neighbor
tables. Shows performance improvements of up to 12% using NVCC and SID
composites or dim2tuple on smaller domains. Using Clang, up to 70%
performance improvements can be observed in these cases.
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.

4 participants