8000 Add strings with UMF version and useful CMake options by ldorau · Pull Request #992 · oneapi-src/unified-memory-framework · GitHub
[go: up one dir, main page]

Skip to content

Add strings with UMF version and useful CMake options #992

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

Conversation

ldorau
Copy link
Contributor
@ldorau ldorau commented Dec 11, 2024

Description

Add strings with UMF version and useful CMake variables that can be grepped in the following way:

$ strings libumf.so | grep "@(#)"
@(#) Intel(R) UMF version: 0.10.0-git4.g55d6db70
@(#) Intel(R) UMF CMake variables: "CMAKE_BUILD_TYPE:Debug,UMF_BUILD_BENCHMARKS:OFF,UMF_BUILD_BENCHMARKS_MT:OFF,UMF_BUILD_CUDA_PROVIDER:ON,UMF_BUILD_EXAMPLES:ON,UMF_BUILD_FUZZTESTS:OFF,UMF_BUILD_GPU_EXAMPLES:OFF,UMF_BUILD_GPU_TESTS:OFF,UMF_BUILD_LEVEL_ZERO_PROVIDER:ON,UMF_BUILD_LIBUMF_POOL_DISJOINT:OFF,UMF_BUILD_LIBUMF_POOL_JEMALLOC:ON,UMF_BUILD_SHARED_LIBRARY:ON,UMF_BUILD_TESTS:ON,UMF_DEVELOPER_MODE:ON,UMF_DISABLE_HWLOC:OFF,UMF_FORMAT_CODE_STYLE:ON,UMF_HWLOC_NAME:hwloc,UMF_LINK_HWLOC_STATICALLY:OFF,UMF_PROXY_LIB_BASED_ON_POOL:SCALABLE,UMF_TESTS_FAIL_ON_SKIP:OFF,UMF_USE_ASAN:OFF,UMF_USE_COVERAGE:OFF,UMF_USE_MSAN:OFF,UMF_USE_TSAN:OFF,UMF_USE_UBSAN:OFF,UMF_USE_VALGRIND:OFF,"

Checklist

  • Code compiles without errors locally
  • All tests pass locally
  • CI workflows execute properly

@ldorau ldorau requested a review from a team as a code owner December 11, 2024 14:41
@ldorau ldorau marked this pull request as draft December 11, 2024 14:41
@ldorau ldorau changed the base branch from main to v0.10.x December 11, 2024 14:46
@ldorau ldorau force-pushed the Add_strings_with_UMF_version_and_all_UMF_CMake_variables branch from a68991a to 351aff4 Compare December 11, 2024 14:47
@bratpiorka
Copy link
Contributor

please paste example output in PR description

Copy link
Contributor
@lukaszstolarczuk lukaszstolarczuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as for your question/TODO add info to README.md ? - I believe we could add a new section "Debugging", perhaps in the CONTRIBUTING.md

@lukaszstolarczuk
Copy link
Contributor

please paste example output in PR description

yeah, I agree, it'd be nice to have a full example output, to see which vars are included

@lplewa
Copy link
Contributor
lplewa commented Dec 11, 2024
@(#) Intel(R) UMF CMake variables: "UMF_VERSION_REVISION:4,UMF_VERSION_PRIVATE:1,UMF_VERSION_PRERELEASE:0,UMF_VERSION_BUGFIX:0,UMF_VERSION:0.10.0-git4.g351aff4,UMF_USE_VALGRIND:OFF,UMF_USE_UBSAN:OFF,UMF_USE_TSAN:OFF,UMF_USE_MSAN:OFF,UMF_USE_COVERAGE:OFF,UMF_USE_ASAN:OFF,UMF_TESTS_FAIL_ON_SKIP:OFF,UMF_PROXY_LIB_ENABLED:ON,UMF_PROXY_LIB_BASED_ON_POOL:SCALABLE,UMF_POOL_SCALABLE_ENABLED:TRUE,UMF_LINK_HWLOC_STATICALLY:OFF,UMF_LEVEL_ZERO_INCLUDE_DIR:,UMF_INSTALL_RPATH:,UMF_HWLOC_TAG:hwloc-2.10.0,UMF_HWLOC_REPO:https://github.com/open-mpi/hwloc.git,UMF_HWLOC_NAME:hwloc,UMF_FORMAT_CODE_STYLE:OFF,UMF_DISABLE_HWLOC:OFF,UMF_DEVELOPER_MODE:OFF,UMF_CUDA_INCLUDE_DIR:,UMF_CMAKE_VERSION:0.10.0,UMF_CMAKE_SOURCE_DIR:/home/lplewa/unified-memory-framework,UMF_BUILD_TESTS:ON,UMF_BUILD_SHARED_LIBRARY:ON,UMF_BUILD_LIBUMF_POOL_JEMALLOC:OFF,UMF_BUILD_LIBUMF_POOL_DISJOINT:OFF,UMF_BUILD_LEVEL_ZERO_PROVIDER:ON,UMF_BUILD_GPU_TESTS:OFF,UMF_BUILD_GPU_EXAMPLES:OFF,UMF_BUILD_FUZZTESTS:OFF,UMF_BUILD_EXAMPLES:ON,UMF_BUILD_CUDA_PROVIDER:ON,UMF_BUILD_BENCHMARKS_MT:OFF,UMF_BUILD_BENCHMARKS:OFF,CMAKE_UMF_OUTPUT_DIRECTORY:/home/lplewa/unified-memory-framework/build_test/bin,"
@(#) Intel(R) UMF version: 0.10.0-git4.g351aff4

not sure if we should leak build information, like paths in build system.

@bratpiorka
Copy link
Contributor

hmm maybe we could just log UMF build options - this should be easy with this code snippet :)

# Define a list to store the names of all options
set(UMF_OPTIONS_LIST "")

# Define a macro to wrap the option() command and track the options
macro(UMF_OPTION)
  list(APPEND UMF_OPTIONS_LIST ${ARGV0})
  option(${ARGV})
endmacro()

# Example options
UMF_OPTION(UMF_ENABLE_FEATURE_X "Enable feature X" OFF)

@ldorau
Copy link
Contributor Author
ldorau commented Dec 12, 2024

please paste example output in PR description

Done

@ldorau
Copy link
Contributor Author
ldorau commented Dec 12, 2024

not sure if we should leak build information, like paths in build system.

Done

@ldorau ldorau force-pushed the Add_strings_with_UMF_version_and_all_UMF_CMake_variables branch from 351aff4 to 0925bb1 Compare December 12, 2024 09:03
@ldorau ldorau marked this pull request as ready for review December 12, 2024 09:03
@ldorau ldorau force-pushed the Add_strings_with_UMF_version_and_all_UMF_CMake_variables branch from 0925bb1 to bf701ee Compare December 12, 2024 09:04
Copy link
Contributor
@lukaszstolarczuk lukaszstolarczuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

beside minor issues, LGTM

@ldorau ldorau changed the title Add strings with UMF version and all UMF CMake variables Add strings with UMF version and useful CMake options Dec 12, 2024
Add strings with UMF version and useful CMake options
that can be grepped in the following way:

$ strings libumf.so | grep "@(#)"
@(#) Intel(R) UMF version: 0.11.0-dev.git66.g89e3831d
@(#) Intel(R) UMF CMake variables: "CMAKE_BUILD_TYPE:Debug,...

Signed-off-by: Lukasz Dorau <lukasz.dorau@intel.com>
@ldorau ldorau force-pushed the Add_strings_with_UMF_version_and_all_UMF_CMake_variables branch from bf701ee to 0f8b59d Compare December 12, 2024 13:00
@ldorau ldorau merged commit ac9094d into oneapi-src:v0.10.x Dec 12, 2024
78 checks passed
@ldorau ldorau deleted the Add_strings_with_UMF_version_and_all_UMF_CMake_variables branch December 12, 2024 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0