Skip to content

Commit 24e7119

Browse files
authored
Merge pull request #940 from vinser52/svinogra_cuda_params
Fix failure with destructor order in CUDA params
2 parents dc4ff8b + 109cc50 commit 24e7119

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/pool/pool_scalable.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#include <umf/pools/pool_scalable.h>
2020

2121
#include "base_alloc_global.h"
22+
#include "libumf.h"
2223
#include "utils_common.h"
2324
#include "utils_concurrency.h"
2425
#include "utils_load_library.h"
@@ -175,6 +176,7 @@ static void tbb_raw_free_wrapper(intptr_t pool_id, void *ptr, size_t bytes) {
175176

176177
umf_result_t
177178
umfScalablePoolParamsCreate(umf_scalable_pool_params_handle_t *hParams) {
179+
libumfInit();
178180
if (!hParams) {
179181
LOG_ERR("scalable pool params handle is NULL");
180182
return UMF_RESULT_ERROR_INVALID_ARGUMENT;

src/provider/provider_cuda.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ umf_memory_provider_ops_t *umfCUDAMemoryProviderOps(void) {
6868
#endif // _MSC_VER
6969

7070
#include "base_alloc_global.h"
71+
#include "libumf.h"
7172
#include "utils_assert.h"
7273
#include "utils_common.h"
7374
#include "utils_concurrency.h"
@@ -201,6 +202,7 @@ static void init_cu_global_state(void) {
201202

202203
umf_result_t umfCUDAMemoryProviderParamsCreate(
203204
umf_cuda_memory_provider_params_handle_t *hParams) {
205+
libumfInit();
204206
if (!hParams) {
205207
LOG_ERR("CUDA Memory Provider params handle is NULL");
206208
return UMF_RESULT_ERROR_INVALID_ARGUMENT;

0 commit comments

Comments
 (0)