Skip to content

Fix static treelite build flag - #8262

Open
fallintoplace wants to merge 2 commits into
NVIDIA:mainfrom
fallintoplace:fix-static-treelite-build-flag
Open

Fix static treelite build flag#8262
fallintoplace wants to merge 2 commits into
NVIDIA:mainfrom
fallintoplace:fix-static-treelite-build-flag

Conversation

@fallintoplace

Copy link
Copy Markdown
Contributor

Summary

  • Allow --static-treelite through build.sh argument validation.
  • Add static-treelite to the getopt long-option list so the existing handler can run.

Testing

  • bash -n build.sh
  • PARALLEL_LEVEL=1 ./build.sh pydocs --configure-only --static-treelite
  • PARALLEL_LEVEL=1 ./build.sh --static-treelite --help | rg -- "--static-treelite"
  • git diff --check

Shellcheck was not available locally.

@fallintoplace
fallintoplace requested a review from a team as a code owner June 13, 2026 12:55
@fallintoplace
fallintoplace requested a review from bdice June 13, 2026 12:55
@copy-pr-bot

copy-pr-bot Bot commented Jun 13, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@coderabbitai

coderabbitai Bot commented Jun 13, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 84a04f70-46a4-48f6-b1d4-d120c9488921

📥 Commits

Reviewing files that changed from the base of the PR and between 3d9b844 and 39b48ed.

📒 Files selected for processing (2)
  • build.sh
  • cpp/cmake/thirdparty/get_nvforest.cmake
🚧 Files skipped from review as they are similar to previous changes (2)
  • cpp/cmake/thirdparty/get_nvforest.cmake
  • build.sh

📝 Walkthrough

Summary by CodeRabbit

  • Bug Fixes

    • The --static-treelite build flag is now properly recognized and parsed, preventing failures during build option validation.
  • Build System Enhancements

    • The static Treelite setting is now forwarded into the nvForest build configuration, keeping static builds consistent across components.

Walkthrough

The build script now recognizes --static-treelite, and the CMake nvForest dependency receives the corresponding static Treelite setting.

Changes

Static Treelite configuration

Layer / File(s) Summary
Register --static-treelite flag
build.sh
The flag is added to VALIDFLAGS and LONG_ARGUMENT_LIST for validation and getopt parsing.
Forward static Treelite setting
cpp/cmake/thirdparty/get_nvforest.cmake
The nvForest build receives NVFOREST_USE_TREELITE_STATIC from CUML_USE_TREELITE_STATIC.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Suggested reviewers: bdice, divyegala

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the fix to the static Treelite build flag.
Description check ✅ Passed The description accurately explains the build script and option parsing changes and lists relevant testing.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@chyunsu3 chyunsu3 added improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels Jul 2, 2026
@chyunsu3 chyunsu3 assigned chyunsu3 and unassigned fallintoplace Jul 10, 2026
@chyunsu3

Copy link
Copy Markdown
Contributor

I will review today.

@chyunsu3

Copy link
Copy Markdown
Contributor

/ok to test 0bf4bd1

@chyunsu3
chyunsu3 requested a review from a team as a code owner July 11, 2026 00:03
@chyunsu3
chyunsu3 requested a review from divyegala July 11, 2026 00:03
@chyunsu3

Copy link
Copy Markdown
Contributor

I ran ./build.sh --static-treelite and it ran successfully. (Note: For this to work, your Python env should not have Treelite installed, so that the build can build Treelite from the source.)

@fallintoplace

Copy link
Copy Markdown
Contributor Author

Glad to hear. Thank you.

@chyunsu3

Copy link
Copy Markdown
Contributor

/ok to test 8f8f7ef

@chyunsu3

Copy link
Copy Markdown
Contributor

I'm moving this pull request to release 26.10.

@fallintoplace
fallintoplace force-pushed the fix-static-treelite-build-flag branch from 3d9b844 to 39b48ed Compare August 3, 2026 22:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CMake CUDA/C++ improvement Improvement / enhancement to an existing function non-breaking Non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants