TensorRT-LLM icon indicating copy to clipboard operation
TensorRT-LLM copied to clipboard

fix: Early exit cmake if find_library() does not find any lib

Open WilliamTambellini opened this issue 9 months ago • 19 comments

Early exit if find_library() does not find any lib. As today, the find_library_create_target() cmake macro blindly continues even if the lib is not found, adding LIB_PATH-NOTFOUND to the target and making the build failing anyway later with non obvious reasons. This change just early exits if the lib is simply not found with a proper error message. Fix github issue #3109

WilliamTambellini avatar Mar 26 '25 18:03 WilliamTambellini

Thanks for contributing this fix, @WilliamTambellini . Let me trigger the CI now.

June

juney-nvidia avatar Mar 26 '25 23:03 juney-nvidia

/bot run

juney-nvidia avatar Mar 26 '25 23:03 juney-nvidia

PR_Github #623 [ run ] triggered by Bot

tensorrt-cicd avatar Mar 26 '25 23:03 tensorrt-cicd

PR_Github #623 [ run ] completed with state FAILURE /LLM/main/L0_MergeRequest_PR pipeline #525 completed with status: 'FAILURE'

tensorrt-cicd avatar Mar 26 '25 23:03 tensorrt-cicd

@WilliamTambellini

Hi William, your MR just failed to pass the style checker.

Pls follow this guide to ensure your MR can be ready to pass it:)

https://github.com/NVIDIA/TensorRT-LLM/blob/main/CONTRIBUTING.md

June

juney-nvidia avatar Mar 26 '25 23:03 juney-nvidia

/bot run

juney-nvidia avatar Mar 27 '25 05:03 juney-nvidia

PR_Github #646 [ run ] triggered by Bot

tensorrt-cicd avatar Mar 27 '25 06:03 tensorrt-cicd

PR_Github #646 [ run ] completed with state FAILURE /LLM/main/L0_MergeRequest_PR pipeline #545 completed with status: 'FAILURE'

tensorrt-cicd avatar Mar 27 '25 06:03 tensorrt-cicd

@WilliamTambellini

Hi William, your MR just failed to pass the style checker.

Pls follow this guide to ensure your MR can be ready to pass it:)

https://github.com/NVIDIA/TensorRT-LLM/blob/main/CONTRIBUTING.md

June

Tks @juney-nvidia . I ve upgraded to python3.12 and clang-format 19, and managed to pass the precommit hook:

$ git commit -s --amend
isort................................................(no files to check)Skipped
CRLF end-lines remover...............................(no files to check)Skipped
yapf.................................................(no files to check)Skipped
check for added large files..........................(no files to check)Skipped
check for merge conflicts............................(no files to check)Skipped
check for broken symlinks............................(no files to check)Skipped
detect private key...................................(no files to check)Skipped
fix end of files.....................................(no files to check)Skipped
check yaml...........................................(no files to check)Skipped
trim trailing whitespace.............................(no files to check)Skipped
check toml...........................................(no files to check)Skipped
mixed line ending....................................(no files to check)Skipped
debug statements (python)............................(no files to check)Skipped
check json...........................................(no files to check)Skipped
autoflake............................................(no files to check)Skipped
clang-format.........................................(no files to check)Skipped
cmake-format.........................................(no files to check)Skipped
codespell............................................(no files to check)Skipped
ruff.................................................(no files to check)Skipped
ruff-format..........................................(no files to check)Skipped
mdformat.............................................(no files to check)Skipped
isort.......................................................................(no files to check)Skipped
yapf........................................................................(no files to check)Skipped
check for added large files.....................................................................Passed
check for merge conflicts.......................................................................Passed
check for broken symlinks...................................................(no files to check)Skipped
detect private key..............................................................................Passed
check yaml..................................................................(no files to check)Skipped
check toml..................................................................(no files to check)Skipped
mixed line ending...........................................................(no files to check)Skipped
debug statements (python)...................................................(no files to check)Skipped
check json..................................................................(no files to check)Skipped
autoflake...................................................................(no files to check)Skipped
clang-format................................................................(no files to check)Skipped
cmake-format................................................................(no files to check)Skipped
codespell.......................................................................................Passed
ruff........................................................................(no files to check)Skipped
ruff-format.................................................................(no files to check)Skipped
mdformat....................................................................(no files to check)Skipped
Checks the commit message for a developer certificate of origin signature.......................Passed

I dont have access to your CI logs so dont know what is the failure. Will investigate further though tomorrow.

WilliamTambellini avatar Mar 27 '25 07:03 WilliamTambellini

/LLM/main/L0_MergeRequest_PR pipeline #545

@WilliamTambellini

Hi,

Sorry for the current inconvenience that you cannot see the error log. We are working with the infra team to try to improve it, hoping it can become smoother. @DylanChen-NV @zeroepoch @mk-nvidia @niukuo @ZhanruiSunCh for vis.

I just took a look of the failure, and it still hasn't passed the style checker yet. To ease your debugging effort, I just copied the error message here: image

juney-nvidia avatar Mar 27 '25 08:03 juney-nvidia

Tks @juney-nvidia my prehook did run cmake-format but (weirldy) "(no files to check)Skipped"... I have retouched and repushed my change.

WilliamTambellini avatar Mar 27 '25 17:03 WilliamTambellini

@WilliamTambellini Thanks, let me re-run the CI.

June

juney-nvidia avatar Mar 28 '25 00:03 juney-nvidia

/bot run

juney-nvidia avatar Mar 28 '25 00:03 juney-nvidia

@WilliamTambellini BTW, there is an ongoing MR from our colleague to improve the community contribution process to let the pre-commit check result visible to the community which is expected to make the similar process smoother:

  • https://github.com/NVIDIA/TensorRT-LLM/pull/3129

June

juney-nvidia avatar Mar 28 '25 00:03 juney-nvidia

/bot run

juney-nvidia avatar Mar 28 '25 10:03 juney-nvidia

PR_Github #679 [ run ] triggered by Bot

tensorrt-cicd avatar Mar 28 '25 10:03 tensorrt-cicd

PR_Github #679 [ run ] completed with state SUCCESS /LLM/main/L0_MergeRequest_PR pipeline #570 completed with status: 'SUCCESS'

tensorrt-cicd avatar Mar 28 '25 12:03 tensorrt-cicd

Tks @juney-nvidia and @zeroepoch

WilliamTambellini avatar Mar 28 '25 17:03 WilliamTambellini

looks good

graehl avatar Mar 28 '25 17:03 graehl

/bot reuse-pipeline

juney-nvidia avatar Mar 29 '25 11:03 juney-nvidia

PR_Github #689 [ reuse-pipeline ] triggered by Bot

tensorrt-cicd avatar Mar 29 '25 11:03 tensorrt-cicd

PR_Github #689 [ reuse-pipeline ] completed with state SUCCESS Reusing PR_Github #679 for commit 7aaeaea

tensorrt-cicd avatar Mar 29 '25 11:03 tensorrt-cicd

@WilliamTambellini merged to main, thanks for the contribution.

June

juney-nvidia avatar Mar 29 '25 12:03 juney-nvidia