Skip to content

Commit

Permalink
Disable mimalloc by default for DPC++
Browse files Browse the repository at this point in the history
  • Loading branch information
fknorr committed Aug 14, 2023
1 parent d1ce304 commit c151962
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
10 changes: 9 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ else()
set(ENABLE_ACC_CHECK OFF)
endif()

option(CELERITY_USE_MIMALLOC "Use the mimalloc memory allocator" ON)
option(CELERITY_ACCESSOR_BOUNDARY_CHECK "Enable accessor boundary check" ${ENABLE_ACC_CHECK})

if(CELERITY_ACCESSOR_BOUNDARY_CHECK)
Expand Down Expand Up @@ -119,6 +118,15 @@ if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "CMake Build Type" FORCE)
endif()

if(CELERITY_SYCL_IMPL STREQUAL "DPC++")
# See https://github.com/oneapi-src/unified-runtime/issues/803
message(STATUS "Not enabling mimalloc by default because it breaks with oneAPI plugin loading")
set(CELERITY_USE_MIMALLOC_DEFAULT OFF)
else()
set(CELERITY_USE_MIMALLOC_DEFAULT ON)
endif()
option(CELERITY_USE_MIMALLOC "Use the mimalloc memory allocator" ${CELERITY_USE_MIMALLOC_DEFAULT})

# 3rdparty dependencies
include(FetchContent)

Expand Down
4 changes: 3 additions & 1 deletion cmake/celerity-config.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ find_dependency(fmt REQUIRED)
find_dependency(spdlog REQUIRED)
find_dependency(small_vector REQUIRED)
find_dependency(libenvpp REQUIRED)
find_dependency(mimalloc REQUIRED)
if(@CELERITY_USE_MIMALLOC@)
find_dependency(mimalloc REQUIRED)
endif()
if(@CELERITY_ENABLE_CUDA_BACKEND@)
if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.17")
find_dependency(CUDAToolkit REQUIRED)
Expand Down

0 comments on commit c151962

Please sign in to comment.