Make pybind11 and nanobind required for benchmarks; fix CI backend detection#6
Merged
peter-urban merged 5 commits intoxtensor-nanobindfrom Feb 8, 2026
Merged
Conversation
- run_benchmarks.py: try importing pre-built extensions before setup.py build - run_benchmarks.py: exit(1) when no backends available (was exit(0)) - run_benchmarks.py: add --require-all flag for requiring both backends - linux.yml/osx.yml: enable BUILD_NANOBIND_BENCHMARK, build benchmark targets, run from build/benchmark with --require-all Co-authored-by: peter-urban <3885740+peter-urban@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Require pybind11 and nanobind for benchmarks
Make pybind11 and nanobind required for benchmarks; fix CI backend detection
Feb 6, 2026
Owner
|
@copilot some tests are failing, please fix |
…g error - benchmark/CMakeLists.txt: always link xtensor-python for pybind11 benchmark target (was missing on APPLE, causing pybind11/pybind11.h not found) - benchmark/main_nanobind.cpp: use from_shape() instead of brace-init to fix size_t-to-double narrowing error on macOS Co-authored-by: peter-urban <3885740+peter-urban@users.noreply.github.com>
Author
Fixed in 0fee0a7. The macOS builds were failing because:
|
Owner
|
@copilot tests are still failing, please fix |
- benchmark/CMakeLists.txt: add PRIVATE keyword to MSVC target_link_libraries to fix CMake error about mixing keyword/plain signatures - benchmark/main.cpp:429: use from_shape() instead of brace-init to fix size_t-to-double narrowing error on macOS Co-authored-by: peter-urban <3885740+peter-urban@users.noreply.github.com>
Author
Fixed in f9bd778. Two issues:
|
Owner
|
@copilot nearly there, pybind11 is still not avaliable for windows benchmarks. |
Apply same changes as linux.yml/osx.yml: - Add -DBUILD_NANOBIND_BENCHMARK=ON to CMake configure - Build benchmark_xtensor_python and benchmark_xtensor_nanobind targets - Run benchmarks from build/benchmark with --require-all - Remove continue-on-error: true Co-authored-by: peter-urban <3885740+peter-urban@users.noreply.github.com>
Author
Fixed in c967a1d. The Windows workflow ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
benchmark/run_benchmarks.py: try importing pre-built extensions before attempting setup.py buildbenchmark/run_benchmarks.py: exit with non-zero when no backends available (sys.exit(0)→sys.exit(1))benchmark/run_benchmarks.py: add--require-allflag to require both pybind11 and nanobind backends.github/workflows/linux.yml: enable nanobind benchmark build, build benchmark targets, run from build dir with--require-all.github/workflows/osx.yml: same changes as linux CI.github/workflows/windows.yml: same changes as linux/osx CI (was missing benchmark build targets and--require-all)xtensor-pythonon APPLE in benchmark CMakeLists.txtbenchmark/main_nanobind.cpp:392target_link_librariesin benchmark CMakeLists.txtbenchmark/main.cpp:429Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.