Skip to content

Commit

Permalink
Fixed #675: Can now query (the global) CUDA module loading mode
Browse files Browse the repository at this point in the history
  • Loading branch information
eyalroz committed Sep 6, 2024
1 parent fc415b6 commit 0f445ac
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/cuda/api/module.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,17 @@ module_t create(
ContiguousContainer module_data);
///@}

#if CUDA_VERSION >= 12030
using loading_mode_t = CUmoduleLoadingMode;

inline loading_mode_t loading_mode() {
loading_mode_t result;
auto status = cuModuleGetLoadingMode(&result);
throw_if_error_lazy(status, "Failed obtaining CUDA module loading mode");
return result;
}
#endif

} // namespace module

/**
Expand Down

0 comments on commit 0f445ac

Please sign in to comment.