Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
Tue Sep 16 2025 Łukasz Stolarczuk <lukasz.stolarczuk@intel.com>

* Version 1.0.3

This patch release contains following change:
- load libcuda.so.1 instead of libcuda.so on linux (#1518)

Wed Sep 03 2025 Łukasz Stolarczuk <lukasz.stolarczuk@intel.com>

* Version 1.0.2

This patch release contains following change:
- initialize hwloc topology only before first fork, not always (#1509)

Fri Aug 08 2025 Łukasz Stolarczuk <lukasz.stolarczuk@intel.com>

* Version 1.0.1
Expand Down
15 changes: 11 additions & 4 deletions src/libumf.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,13 @@ static umf_ctl_node_t CTL_NODE(umf)[] = {CTL_CHILD(provider), CTL_CHILD(pool),

void initialize_global_ctl(void) { CTL_REGISTER_MODULE(NULL, umf); }

// Benchmarks may fork multiple times and topology init is slow.
// Init topology before fork (if not already) so children don't repeat it.
// TODO: This is a hack. Better solution is needed.
#if !defined(_WIN32) && !defined(UMF_NO_HWLOC)
static void atfork_prepare(void) { umfGetTopologyReduced(); }
#endif

umf_result_t umfInit(void) {
utils_init_once(&initMutexOnce, initialize_init_mutex);

Expand Down Expand Up @@ -74,11 +81,11 @@ umf_result_t umfInit(void) {
if (TRACKER) {
LOG_DEBUG("UMF library initialized");
}
#if !defined(UMF_NO_HWLOC)
// some benchmarks uses multiple forks, and topology initialization is very slow
// so if we initialize topology before the first fork, we can get significant performance gain.
umfGetTopologyReduced();

#if !defined(_WIN32) && !defined(UMF_NO_HWLOC)
pthread_atfork(atfork_prepare, NULL, NULL);
#endif

return UMF_RESULT_SUCCESS;
}

Expand Down
2 changes: 1 addition & 1 deletion src/provider/provider_cuda.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ static void init_cu_global_state(void) {
#ifdef _WIN32
const char *lib_name = "nvcuda.dll";
#else
const char *lib_name = "libcuda.so";
const char *lib_name = "libcuda.so.1";
#endif
// The CUDA shared library should be already loaded by the user
// of the CUDA provider. UMF just want to reuse it
Expand Down
2 changes: 1 addition & 1 deletion test/providers/cuda_helpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ int InitCUDAOps() {
#ifdef _WIN32
const char *lib_name = "nvcuda.dll";
#else
const char *lib_name = "libcuda.so";
const char *lib_name = "libcuda.so.1";
#endif
// CUDA symbols
#if OPEN_CU_LIBRARY_GLOBAL
Expand Down
Loading