You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The getDriverEntryPoint function uses cudaGetDriverEntryPointByVersion when CUDA_VERSION >= 12050, but the version parameter is not used in the cudaGetDriverEntryPoint call for older versions. This might lead to incorrect behavior if the version is expected to be used in some way.
The DEFINE_DRIVER_API_WRAPPER macro has been redefined with significant changes. It would be beneficial to ensure that the new macro does not introduce code duplication and that the old logic is not unnecessarily repeated.
#defineDEFINE_DRIVER_API_WRAPPER(funcName, version) \
namespace { \
template <typename ReturnType, typename... Args> \
structfuncName##Loader { \
static ReturnType lazilyLoadAndInvoke(Args... args) { \
staticdecltype(::funcName)* entry_point; \
static std::once_flag once; \
std::call_once( \
once, \
getDriverEntryPoint, \
#funcName, \
version, \
reinterpret_cast<void**>(&entry_point)); \
returnentry_point(args...); \
} \
/* This ctor is just a CTAD helper, it is only used in a */ \
/* non-evaluated environment*/ \
funcName##Loader(ReturnType(Args...)){}; \
}; \
\
/* Use CTAD rule to deduct return and argument types */ \
template <typename ReturnType, typename... Args> \
funcName##Loader(ReturnType(Args...)) \
->funcName##Loader<ReturnType, Args...>; \
} /* namespace */ \
\
decltype(::funcName)* funcName = \
The new getDriverEntryPoint function and the changes in DEFINE_DRIVER_API_WRAPPER macro should be documented to explain the rationale behind the changes and how they address the performance or functionality issues.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For #4349 (comment)