diff --git a/src/provider/provider_cuda.c b/src/provider/provider_cuda.c index baccbd0235..ce2f1debb7 100644 --- a/src/provider/provider_cuda.c +++ b/src/provider/provider_cuda.c @@ -12,17 +12,21 @@ #include #include +#include "utils_log.h" + #if defined(UMF_NO_CUDA_PROVIDER) umf_result_t umfCUDAMemoryProviderParamsCreate( umf_cuda_memory_provider_params_handle_t *hParams) { (void)hParams; + LOG_ERR("CUDA provider is disabled (UMF_BUILD_CUDA_PROVIDER is OFF)!"); return UMF_RESULT_ERROR_NOT_SUPPORTED; } umf_result_t umfCUDAMemoryProviderParamsDestroy( umf_cuda_memory_provider_params_handle_t hParams) { (void)hParams; + LOG_ERR("CUDA provider is disabled (UMF_BUILD_CUDA_PROVIDER is OFF)!"); return UMF_RESULT_ERROR_NOT_SUPPORTED; } @@ -30,6 +34,7 @@ umf_result_t umfCUDAMemoryProviderParamsSetContext( umf_cuda_memory_provider_params_handle_t hParams, void *hContext) { (void)hParams; (void)hContext; + LOG_ERR("CUDA provider is disabled (UMF_BUILD_CUDA_PROVIDER is OFF)!"); return UMF_RESULT_ERROR_NOT_SUPPORTED; } @@ -37,6 +42,7 @@ umf_result_t umfCUDAMemoryProviderParamsSetDevice( umf_cuda_memory_provider_params_handle_t hParams, int hDevice) { (void)hParams; (void)hDevice; + LOG_ERR("CUDA provider is disabled (UMF_BUILD_CUDA_PROVIDER is OFF)!"); return UMF_RESULT_ERROR_NOT_SUPPORTED; } @@ -45,11 +51,13 @@ umf_result_t umfCUDAMemoryProviderParamsSetMemoryType( umf_usm_memory_type_t memoryType) { (void)hParams; (void)memoryType; + LOG_ERR("CUDA provider is disabled (UMF_BUILD_CUDA_PROVIDER is OFF)!"); return UMF_RESULT_ERROR_NOT_SUPPORTED; } umf_memory_provider_ops_t *umfCUDAMemoryProviderOps(void) { // not supported + LOG_ERR("CUDA provider is disabled (UMF_BUILD_CUDA_PROVIDER is OFF)!"); return NULL; } diff --git a/src/provider/provider_devdax_memory.c b/src/provider/provider_devdax_memory.c index 32407acbba..cb5a4af572 100644 --- a/src/provider/provider_devdax_memory.c +++ b/src/provider/provider_devdax_memory.c @@ -17,10 +17,13 @@ #include #include +#include "utils_log.h" + #if defined(_WIN32) || defined(UMF_NO_HWLOC) umf_memory_provider_ops_t *umfDevDaxMemoryProviderOps(void) { // not supported + LOG_ERR("DevDax memory provider is disabled!"); return NULL; } @@ -30,12 +33,14 @@ umf_result_t umfDevDaxMemoryProviderParamsCreate( (void)hParams; (void)path; (void)size; + LOG_ERR("DevDax memory provider is disabled!"); return UMF_RESULT_ERROR_NOT_SUPPORTED; } umf_result_t umfDevDaxMemoryProviderParamsDestroy( umf_devdax_memory_provider_params_handle_t hParams) { (void)hParams; + LOG_ERR("DevDax memory provider is disabled!"); return UMF_RESULT_ERROR_NOT_SUPPORTED; } @@ -45,6 +50,7 @@ umf_result_t umfDevDaxMemoryProviderParamsSetDeviceDax( (void)hParams; (void)path; (void)size; + LOG_ERR("DevDax memory provider is disabled!"); return UMF_RESULT_ERROR_NOT_SUPPORTED; } @@ -52,6 +58,7 @@ umf_result_t umfDevDaxMemoryProviderParamsSetProtection( umf_devdax_memory_provider_params_handle_t hParams, unsigned protection) { (void)hParams; (void)protection; + LOG_ERR("DevDax memory provider is disabled!"); return UMF_RESULT_ERROR_NOT_SUPPORTED; } diff --git a/src/provider/provider_file_memory.c b/src/provider/provider_file_memory.c index 32383a5ecc..7c9ee38564 100644 --- a/src/provider/provider_file_memory.c +++ b/src/provider/provider_file_memory.c @@ -18,10 +18,13 @@ #include #include +#include "utils_log.h" + #if defined(_WIN32) || defined(UMF_NO_HWLOC) umf_memory_provider_ops_t *umfFileMemoryProviderOps(void) { // not supported + LOG_ERR("File memory provider is disabled!"); return NULL; } @@ -29,12 +32,14 @@ umf_result_t umfFileMemoryProviderParamsCreate( umf_file_memory_provider_params_handle_t *hParams, const char *path) { (void)hParams; (void)path; + LOG_ERR("File memory provider is disabled!"); return UMF_RESULT_ERROR_NOT_SUPPORTED; } umf_result_t umfFileMemoryProviderParamsDestroy( umf_file_memory_provider_params_handle_t hParams) { (void)hParams; + LOG_ERR("File memory provider is disabled!"); return UMF_RESULT_ERROR_NOT_SUPPORTED; } @@ -42,6 +47,7 @@ umf_result_t umfFileMemoryProviderParamsSetPath( umf_file_memory_provider_params_handle_t hParams, const char *path) { (void)hParams; (void)path; + LOG_ERR("File memory provider is disabled!"); return UMF_RESULT_ERROR_NOT_SUPPORTED; } @@ -49,6 +55,7 @@ umf_result_t umfFileMemoryProviderParamsSetProtection( umf_file_memory_provider_params_handle_t hParams, unsigned protection) { (void)hParams; (void)protection; + LOG_ERR("File memory provider is disabled!"); return UMF_RESULT_ERROR_NOT_SUPPORTED; } @@ -57,6 +64,7 @@ umf_result_t umfFileMemoryProviderParamsSetVisibility( umf_memory_visibility_t visibility) { (void)hParams; (void)visibility; + LOG_ERR("File memory provider is disabled!"); return UMF_RESULT_ERROR_NOT_SUPPORTED; } diff --git a/src/provider/provider_level_zero.c b/src/provider/provider_level_zero.c index f4a3e97c27..5f9c85a86d 100644 --- a/src/provider/provider_level_zero.c +++ b/src/provider/provider_level_zero.c @@ -14,17 +14,23 @@ #include #include +#include "utils_log.h" + #if defined(UMF_NO_LEVEL_ZERO_PROVIDER) umf_result_t umfLevelZeroMemoryProviderParamsCreate( umf_level_zero_memory_provider_params_handle_t *hParams) { (void)hParams; + LOG_ERR("L0 memory provider is disabled! (UMF_BUILD_LEVEL_ZERO_PROVIDER is " + "OFF)"); return UMF_RESULT_ERROR_NOT_SUPPORTED; } umf_result_t umfLevelZeroMemoryProviderParamsDestroy( umf_level_zero_memory_provider_params_handle_t hParams) { (void)hParams; + LOG_ERR("L0 memory provider is disabled! (UMF_BUILD_LEVEL_ZERO_PROVIDER is " + "OFF)"); return UMF_RESULT_ERROR_NOT_SUPPORTED; } @@ -33,6 +39,8 @@ umf_result_t umfLevelZeroMemoryProviderParamsSetContext( ze_context_handle_t hContext) { (void)hParams; (void)hContext; + LOG_ERR("L0 memory provider is disabled! (UMF_BUILD_LEVEL_ZERO_PROVIDER is " + "OFF)"); return UMF_RESULT_ERROR_NOT_SUPPORTED; } @@ -41,6 +49,8 @@ umf_result_t umfLevelZeroMemoryProviderParamsSetDevice( ze_device_handle_t hDevice) { (void)hParams; (void)hDevice; + LOG_ERR("L0 memory provider is disabled! (UMF_BUILD_LEVEL_ZERO_PROVIDER is " + "OFF)"); return UMF_RESULT_ERROR_NOT_SUPPORTED; } @@ -49,6 +59,8 @@ umf_result_t umfLevelZeroMemoryProviderParamsSetMemoryType( umf_usm_memory_type_t memoryType) { (void)hParams; (void)memoryType; + LOG_ERR("L0 memory provider is disabled! (UMF_BUILD_LEVEL_ZERO_PROVIDER is " + "OFF)"); return UMF_RESULT_ERROR_NOT_SUPPORTED; } @@ -58,11 +70,15 @@ umf_result_t umfLevelZeroMemoryProviderParamsSetResidentDevices( (void)hParams; (void)hDevices; (void)deviceCount; + LOG_ERR("L0 memory provider is disabled! (UMF_BUILD_LEVEL_ZERO_PROVIDER is " + "OFF)"); return UMF_RESULT_ERROR_NOT_SUPPORTED; } umf_memory_provider_ops_t *umfLevelZeroMemoryProviderOps(void) { // not supported + LOG_ERR("L0 memory provider is disabled! (UMF_BUILD_LEVEL_ZERO_PROVIDER is " + "OFF)"); return NULL; }