Skip to content

Commit

Permalink
Remove options for customizing UMF
Browse files Browse the repository at this point in the history
UMF is expected to be used with pool tracking enabled
and as a shared library. The options are no longer needed.
  • Loading branch information
igchor committed Mar 15, 2024
1 parent 37b9543 commit 8bfc542
Show file tree
Hide file tree
Showing 8 changed files with 2 additions and 33 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ jobs:
build_type: [Debug, Release]
compiler: [{c: gcc, cxx: g++}]
libbacktrace: ['-DVAL_USE_LIBBACKTRACE_BACKTRACE=OFF']
pool_tracking: ['-DUMF_ENABLE_POOL_TRACKING=ON', '-DUMF_ENABLE_POOL_TRACKING=OFF']
include:
- os: 'ubuntu-22.04'
build_type: Release
Expand Down Expand Up @@ -85,7 +84,6 @@ jobs:
-DUR_FORMAT_CPP_STYLE=ON
-DUR_DPCXX=${{github.workspace}}/dpcpp_compiler/bin/clang++
${{matrix.libbacktrace}}
${{matrix.pool_tracking}}
- name: Configure CMake
if: matrix.os == 'ubuntu-20.04'
Expand All @@ -99,7 +97,6 @@ jobs:
-DUR_BUILD_TESTS=ON
-DUR_FORMAT_CPP_STYLE=ON
${{matrix.libbacktrace}}
${{matrix.pool_tracking}}
- name: Generate source from spec, check for uncommitted diff
if: matrix.os == 'ubuntu-22.04'
Expand Down Expand Up @@ -387,6 +384,5 @@ jobs:
-DCMAKE_BUILD_TYPE=Release
-DUR_BUILD_TESTS=ON
-DUR_FORMAT_CPP_STYLE=ON
-DUMF_ENABLE_POOL_TRACKING=ON
- name: Build
run: cmake --build ${{github.workspace}}/build -j $(sysctl -n hw.logicalcpu)
4 changes: 2 additions & 2 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
sudo apt-get install -y libhwloc-dev
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DUR_DEVELOPER_MODE=ON -DUR_BUILD_TESTS=ON -DUR_ENABLE_TRACING=ON -DUR_BUILD_TOOLS=ON -DUMF_ENABLE_POOL_TRACKING=ON
run: cmake -B ${{github.workspace}}/build -DUR_DEVELOPER_MODE=ON -DUR_BUILD_TESTS=ON -DUR_ENABLE_TRACING=ON -DUR_BUILD_TOOLS=ON

- name: Build
run: cmake --build ${{github.workspace}}/build -j $(nproc)
Expand Down Expand Up @@ -72,7 +72,7 @@ jobs:
- name: Configure CMake
env:
PKG_CONFIG_PATH: "C:/vcpkg/packages/hwloc_x64-windows/lib/pkgconfig/"
run: cmake -B ${{github.workspace}}/build -DCMAKE_POLICY_DEFAULT_CMP0094=NEW -DUR_DEVELOPER_MODE=ON -DUR_BUILD_TESTS=ON -DUR_ENABLE_TRACING=ON -DUR_BUILD_TOOLS=ON -DUMF_ENABLE_POOL_TRACKING=ON
run: cmake -B ${{github.workspace}}/build -DCMAKE_POLICY_DEFAULT_CMP0094=NEW -DUR_DEVELOPER_MODE=ON -DUR_BUILD_TESTS=ON -DUR_ENABLE_TRACING=ON -DUR_BUILD_TOOLS=ON

- name: Build
run: cmake --build ${{github.workspace}}/build -j $(nproc) --config Release
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ jobs:
build_type: [Debug]
compiler: [{c: gcc, cxx: g++}]
libbacktrace: ['-DVAL_USE_LIBBACKTRACE_BACKTRACE=ON']
pool_tracking: ['-DUMF_ENABLE_POOL_TRACKING=ON']

runs-on: ${{matrix.os}}

Expand Down Expand Up @@ -61,7 +60,6 @@ jobs:
-DCMAKE_EXE_LINKER_FLAGS="--coverage"
-DCMAKE_SHARED_LINKER_FLAGS="--coverage"
${{matrix.libbacktrace}}
${{matrix.pool_tracking}}
- name: Build
run: cmake --build ${{github.workspace}}/build -j $(nproc)
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/coverity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ jobs:
-DUR_ENABLE_TRACING=ON
-DUR_DEVELOPER_MODE=ON
-DUR_BUILD_TESTS=ON
-DUMF_ENABLE_POOL_TRACKING=ON
-DUR_FORMAT_CPP_STYLE=ON
-DCMAKE_BUILD_TYPE=Debug
-DUR_BUILD_ADAPTER_L0=ON
Expand Down
2 changes: 0 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ option(UR_USE_MSAN "enable MemorySanitizer" OFF)
option(UR_USE_TSAN "enable ThreadSanitizer" OFF)
option(UR_ENABLE_TRACING "enable api tracing through xpti" OFF)
option(UR_ENABLE_SANITIZER "enable device sanitizer" ON)
option(UMF_BUILD_SHARED_LIBRARY "Build UMF as shared library" OFF)
option(UMF_ENABLE_POOL_TRACKING "Build UMF with pool tracking" ON)
option(UR_BUILD_ADAPTER_L0 "Build the Level-Zero adapter" OFF)
option(UR_BUILD_ADAPTER_OPENCL "Build the OpenCL adapter" OFF)
option(UR_BUILD_ADAPTER_CUDA "Build the CUDA adapter" OFF)
Expand Down
6 changes: 0 additions & 6 deletions source/adapters/cuda/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,6 @@ else()
)
endif()

if(UMF_ENABLE_POOL_TRACKING)
target_compile_definitions("ur_adapter_cuda" PRIVATE UMF_ENABLE_POOL_TRACKING)
else()
message(WARNING "CUDA adapter USM pools are disabled, set UMF_ENABLE_POOL_TRACKING to enable them")
endif()

if (CUDA_cupti_LIBRARY)
target_compile_definitions("ur_adapter_cuda" PRIVATE CUPTI_LIB_PATH="${CUDA_cupti_LIBRARY}")
endif()
Expand Down
8 changes: 0 additions & 8 deletions source/adapters/cuda/usm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -439,8 +439,6 @@ UR_APIEXPORT ur_result_t UR_APICALL urUSMPoolCreate(
///< ::ur_usm_pool_limits_desc_t
ur_usm_pool_handle_t *Pool ///< [out] pointer to USM memory pool
) {
// Without pool tracking we can't free pool allocations.
#ifdef UMF_ENABLE_POOL_TRACKING
if (PoolDesc->flags & UR_USM_POOL_FLAG_ZERO_INITIALIZE_BLOCK) {
return UR_RESULT_ERROR_UNSUPPORTED_FEATURE;
}
Expand All @@ -451,12 +449,6 @@ UR_APIEXPORT ur_result_t UR_APICALL urUSMPoolCreate(
return Ex.getError();
}
return UR_RESULT_SUCCESS;
#else
std::ignore = Context;
std::ignore = PoolDesc;
std::ignore = Pool;
return UR_RESULT_ERROR_UNSUPPORTED_FEATURE;
#endif
}

UR_APIEXPORT ur_result_t UR_APICALL urUSMPoolRetain(
Expand Down
8 changes: 0 additions & 8 deletions source/adapters/hip/usm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -384,8 +384,6 @@ UR_APIEXPORT ur_result_t UR_APICALL urUSMPoolCreate(
///< ::ur_usm_pool_limits_desc_t
ur_usm_pool_handle_t *Pool ///< [out] pointer to USM memory pool
) {
// Without pool tracking we can't free pool allocations.
#ifdef UMF_ENABLE_POOL_TRACKING
if (PoolDesc->flags & UR_USM_POOL_FLAG_ZERO_INITIALIZE_BLOCK) {
return UR_RESULT_ERROR_UNSUPPORTED_FEATURE;
}
Expand All @@ -396,12 +394,6 @@ UR_APIEXPORT ur_result_t UR_APICALL urUSMPoolCreate(
return Ex.getError();
}
return UR_RESULT_SUCCESS;
#else
std::ignore = Context;
std::ignore = PoolDesc;
std::ignore = Pool;
return UR_RESULT_ERROR_UNSUPPORTED_FEATURE;
#endif
}

UR_APIEXPORT ur_result_t UR_APICALL urUSMPoolRetain(
Expand Down

0 comments on commit 8bfc542

Please sign in to comment.