Tune NN server threads and max batch size in genconfig#1201
Open
zsqdx wants to merge 2 commits into
Open
Conversation
Author
|
Additional validation on the Blackwell TensorRT test box:
Build completed successfully. The TensorRT deprecation warnings are pre-existing for this backend/version combination. |
Author
|
Update after additional inference-side tuning work:
Validation:
|
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.
Summary
numNNServerThreadsPerModelseparately from GPU count, capped to a small candidate set (1,2,4on a single GPU).nnMaxBatchSize, choosing among conservative batch/profile candidates by bestnnEvals/safter search-thread and NN-server-thread tuning.numNNServerThreadsPerModelandnnMaxBatchSizevalues when overwriting a config and skipping performance tuning.Motivation
On recent fast TensorRT systems, inference throughput can be sensitive to both the number of backend contexts and the TensorRT max-batch/profile shape. In Blackwell + TensorRT fdx6d testing,
nnMaxBatchSizematerially changednnEvals/s, and values above the default were not always best, so genconfig should measure this instead of relying only on a static heuristic.TensorRT plan caching also greatly reduces repeated startup/tuning time for fixed model/GPU/batch settings, so the workflow now points users toward
-DUSE_CACHE_TENSORRT_PLAN=1where appropriate.Tests
cmake --build .\cpp\build-opencl-codex --target katago -j 4cpp/:.\build-opencl-codex\katago.exe runtestscpp/:.\build-opencl-codex\katago.exe runoutputtests