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

Explicitly Use __ldg on Pointer Derefs #1800

Closed
wants to merge 1 commit into from

Conversation

fthaler
Copy link
Contributor

@fthaler fthaler commented Jul 24, 2024

Used the __ldg intrinsic on (scalar) pointer derefs in SID neighbor tables and derefs within the fn cartesian and unstructured backends.

@fthaler
Copy link
Contributor Author

fthaler commented Jul 24, 2024

launch perftest

@fthaler
Copy link
Contributor Author

fthaler commented Jul 24, 2024

launch jenkins

@gridtoolsjenkins
Copy link
Collaborator

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

@@ -16,6 +16,10 @@
#include "./common_interface.hpp"
#include "./executor.hpp"

#if defined(__CUDA_ARCH__) && __CUDA_ARCH__ >= 350
Copy link
Contributor

Choose a reason for hiding this comment

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

We only support cuda >= 11.0, therefore anyway no support for < 350

Comment on lines +51 to +56
#if defined(__CUDA_ARCH__) && __CUDA_ARCH__ >= 350
if constexpr (std::is_pointer_v<decltype(it.m_ptr)> &&
is_texture_type<std::decay_t<std::remove_pointer_t<decltype(it.m_ptr)>>>::value) {
return __ldg(it.m_ptr);
}
#endif
Copy link
Contributor

Choose a reason for hiding this comment

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

what about introducing a function like
deref_as_const?

@fthaler
Copy link
Contributor Author

fthaler commented Aug 14, 2024

Closed in favor of #1802

@fthaler fthaler closed this Aug 14, 2024
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