Skip to content

Add option for using bundled static hwloc - #1609

Draft
bratpiorka wants to merge 6 commits into
oneapi-src:mainfrom
bratpiorka:rrudnick_static_hwloc
Draft

bratpiorka wants to merge 6 commits into
oneapi-src:mainfrom
bratpiorka:rrudnick_static_hwloc

Conversation

@bratpiorka

@bratpiorka bratpiorka commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Add UMF_USE_BUNDLED_HWLOC option for using bundled static hwloc.

@bratpiorka
bratpiorka force-pushed the rrudnick_static_hwloc branch 8 times, most recently from e6cfe87 to 757d81e Compare September 24, 2026 08:05
@bratpiorka
bratpiorka requested a lite review from Copilot September 24, 2026 13:14

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Critical issues remain in static installation/linking and Windows bundled-header configuration.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 3 High severity

Open (3)
What changed in this PR

Adds UMF_USE_BUNDLED_HWLOC to use bundled static hwloc on Linux and Windows.

Changes:

  • Adds bundled hwloc headers and platform configurations.
  • Updates CMake integration, documentation, CI, and tooling exclusions.
File Summary
src/​deps/​hwloc/​windows/​include/​hwloc/​autogen/​config.h Windows hwloc configuration.
src/​deps/​hwloc/​linux/​include/​hwloc/​autogen/​config.h Linux hwloc configuration.
src/​deps/​hwloc/​include/​hwloc/​shmem.h Bundled shared-memory topology API.
src/​deps/​hwloc/​include/​hwloc/​rsmi.h Bundled ROCm SMI API.
src/​deps/​hwloc/​include/​hwloc/​plugins.h Bundled plugin API.
src/​deps/​hwloc/​include/​hwloc/​openfabrics-verbs.h Bundled OpenFabrics API.
src/​deps/​hwloc/​include/​hwloc/​opencl.h Bundled OpenCL API.
src/​deps/​hwloc/​include/​hwloc/​nvml.h Bundled NVML API.
src/​deps/​hwloc/​include/​hwloc/​memattrs.h Bundled memory-attributes API.
src/​deps/​hwloc/​include/​hwloc/​linux.h Bundled Linux helpers.
src/​deps/​hwloc/​include/​hwloc/​linux-libnuma.h Bundled libnuma API.
src/​deps/​hwloc/​include/​hwloc/​levelzero.h Bundled Level Zero API.
src/​deps/​hwloc/​include/​hwloc/​inlines.h Bundled inline helpers.
src/​deps/​hwloc/​include/​hwloc/​glibc-sched.h Bundled glibc scheduling API.
src/​deps/​hwloc/​include/​hwloc/​gl.h Bundled OpenGL API.
src/​deps/​hwloc/​include/​hwloc/​export.h Bundled topology export API.
src/​deps/​hwloc/​include/​hwloc/​distances.h Bundled distances API.
src/​deps/​hwloc/​include/​hwloc/​diff.h Bundled topology-diff API.
src/​deps/​hwloc/​include/​hwloc/​deprecated.h Bundled compatibility API.
src/​deps/​hwloc/​include/​hwloc/​cudart.h Bundled CUDA runtime API.
src/​deps/​hwloc/​include/​hwloc/​cuda.h Bundled CUDA API.
src/​deps/​hwloc/​include/​hwloc/​cpukinds.h Bundled CPU-kind API.
src/​deps/​hwloc/​include/​hwloc/​bitmap.h Bundled bitmap API.
scripts/​check_license/​file-exceptions.sh Excludes vendored files from license checks.
README.md Documents the bundled hwloc option.
CMakeLists.txt Configures bundled hwloc selection.
.github/​workflows/​reusable_basic.yml Adds bundled hwloc CI coverage.
.github/​workflows/​.spellcheck-conf.toml Excludes vendored files from spellchecking.
.github/​scripts/​run-codespell.py Excludes vendored files from codespell checks.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread CMakeLists.txt
Comment thread src/deps/hwloc/windows/include/hwloc/autogen/config.h Outdated
Comment thread src/deps/hwloc/windows/include/hwloc/autogen/config.h Outdated
@bratpiorka
bratpiorka force-pushed the rrudnick_static_hwloc branch from 757d81e to 0bbfa9d Compare September 24, 2026 13:23
Comment thread .github/workflows/reusable_basic.yml Dismissed
Comment thread .github/workflows/reusable_basic.yml Dismissed
Comment thread .github/workflows/reusable_basic.yml Dismissed
Comment thread .github/workflows/reusable_basic.yml Dismissed
Comment thread .github/workflows/reusable_basic.yml Dismissed
Comment thread .github/workflows/reusable_basic.yml Dismissed
Comment thread .github/workflows/reusable_basic.yml Dismissed
Comment thread .github/workflows/reusable_basic.yml Dismissed
Comment thread .github/workflows/reusable_basic.yml Fixed
Comment thread .github/workflows/reusable_basic.yml Fixed
Comment thread .github/workflows/reusable_basic.yml Fixed
Comment thread .github/workflows/reusable_basic.yml Fixed
@bratpiorka
bratpiorka force-pushed the rrudnick_static_hwloc branch 4 times, most recently from 0a48623 to 4383652 Compare September 29, 2026 12:57
@bratpiorka
bratpiorka requested a lite review from Copilot September 29, 2026 13:09

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Critical portability, CMake compatibility, symbol-isolation, and consumer-target issues remain unresolved.

Review effort: Lite
Findings: 4 High severity

Open (4)
Resolved since last review (3)

Comment thread CMakeLists.txt
Comment thread src/CMakeLists.txt
NAME)
set(UMF_LIBS
${UMF_LIBS}
"$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/${CMAKE_INSTALL_LIBDIR}/${UMF_HWLOC_ARCHIVE_NAME}>"
Comment thread src/deps/hwloc/windows/include/hwloc/autogen/config.h Outdated
find_package(umf REQUIRED CONFIG)

add_executable(umf_install_consumer main.c)
target_link_libraries(umf_install_consumer PRIVATE umf::umf umf::umf_headers)
@bratpiorka
bratpiorka force-pushed the rrudnick_static_hwloc branch 2 times, most recently from 9159115 to b03d490 Compare September 29, 2026 15:41
- name: Build and install UMF
run: |
cmake --build ${{env.BUILD_DIR}} --config ${{matrix.build_type}} -j $Env:NUMBER_OF_PROCESSORS
cmake --install ${{env.BUILD_DIR}} --config ${{matrix.build_type}}
- name: Build and run test of installed UMF
run: |
$extraArgs = @()
$prefixPath = "${{env.INSTL_DIR}}"
@bratpiorka
bratpiorka force-pushed the rrudnick_static_hwloc branch 2 times, most recently from d4dc15d to 2aeb614 Compare September 29, 2026 16:15

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Unresolved critical and moderate build, linkage, compatibility, and artifact-generation issues remain.

Review effort: Lite
Findings: 4 High severity

Open (4)
Resolved since last review (2)

Comment thread CMakeLists.txt
Comment on lines +322 to +325
add_library(${UMF_HWLOC_NAME} INTERFACE)
target_link_libraries(${UMF_HWLOC_NAME} INTERFACE "${LIBHWLOC_LIBRARIES}")
target_include_directories(${UMF_HWLOC_NAME}
INTERFACE ${LIBHWLOC_INCLUDE_DIRS})
'-DCMAKE_STATIC_LINKER_FLAGS=/Brepro')
Invoke-Native cmake @('--build', $BuildDir, '--config', 'Release', '--parallel')

$lib = Join-Path $BuildDir 'Release\hwloc.lib'
@bratpiorka
bratpiorka force-pushed the rrudnick_static_hwloc branch 2 times, most recently from 4b61f8a to 5293fcc Compare October 1, 2026 09:10

This branch has not been deployed

No deployments
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.

3 participants