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

Fix failure with destructor order in CUDA params #940

Merged
merged 2 commits into from
Nov 27, 2024
Merged
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
2 changes: 2 additions & 0 deletions src/pool/pool_scalable.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include <umf/pools/pool_scalable.h>

#include "base_alloc_global.h"
#include "libumf.h"
#include "utils_common.h"
#include "utils_concurrency.h"
#include "utils_load_library.h"
Expand Down Expand Up @@ -175,6 +176,7 @@ static void tbb_raw_free_wrapper(intptr_t pool_id, void *ptr, size_t bytes) {

umf_result_t
umfScalablePoolParamsCreate(umf_scalable_pool_params_handle_t *hParams) {
libumfInit();
if (!hParams) {
LOG_ERR("scalable pool params handle is NULL");
return UMF_RESULT_ERROR_INVALID_ARGUMENT;
Expand Down
2 changes: 2 additions & 0 deletions src/provider/provider_cuda.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ umf_memory_provider_ops_t *umfCUDAMemoryProviderOps(void) {
#endif // _MSC_VER

#include "base_alloc_global.h"
#include "libumf.h"
#include "utils_assert.h"
#include "utils_common.h"
#include "utils_concurrency.h"
Expand Down Expand Up @@ -201,6 +202,7 @@ static void init_cu_global_state(void) {

umf_result_t umfCUDAMemoryProviderParamsCreate(
umf_cuda_memory_provider_params_handle_t *hParams) {
libumfInit();
if (!hParams) {
LOG_ERR("CUDA Memory Provider params handle is NULL");
return UMF_RESULT_ERROR_INVALID_ARGUMENT;
Expand Down
Loading