-
Notifications
You must be signed in to change notification settings - Fork 1.8k
[None] [refactor] Minor cleanup and improvements #7619
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
/bot run |
PR_Github #18046 [ run ] triggered by Bot |
📝 WalkthroughWalkthroughHeader and API qualifier updates (noexcept/const/[[nodiscard]]), includes and license year bumps; executor constant initializer reformatted; BufferView exception message clarified; createNewDecoderRequests public types and includes simplified; lookaheadModule and modelConfig signature/include tweaks; tests updated to remove modelType and to use getNumDraftTokens(). Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
Pre-merge checks and finishing touches❌ Failed checks (2 warnings, 1 inconclusive)
✨ Finishing touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
cpp/tests/e2e_tests/batch_manager/trtGptModelRealDecoderTest.cpp (1)
287-329
: Fix potential out-of-bounds when maxNewTokens <= 2 in pickRandomEndIds.endIdCol is computed as 2 + rand() % max(maxNewTokens - 2, 1); when maxNewTokens is 1 or 2, this yields 2 and can exceed available columns, leading to OOB access. Clamp the selection for small ranges and optionally reserve the vector.
std::vector<TokenIdType> pickRandomEndIds(TestData const& testData, std::vector<SizeType32> const& givenInputLengths, SizeType32 const maxNewTokens, bool replaceLogits) { auto const nbGivenInputs = testData.nbGivenInputs; auto const beamWidth = testData.beamWidth; auto* const expectedOutputData = bufferCast<TokenIdType>(*testData.expectedOutputIds); - std::vector<TokenIdType> endIds; + std::vector<TokenIdType> endIds; + endIds.reserve(nbGivenInputs); // For IFB, pick one of the output tokens as endId for (SizeType32 bi = 0; bi < nbGivenInputs; ++bi) { TokenIdType skippedEndId0 = 0; TokenIdType skippedEndId1 = 0; SizeType32 endIdIndex = 0; TokenIdType endId = 0; auto const endIdRow = bi; auto const inputLength = givenInputLengths.at(endIdRow); do { auto const endIdBeam = std::rand() % beamWidth; auto const firstOutputIndex = tc::flat_index3(endIdRow, endIdBeam, inputLength, beamWidth, testData.maxSeqLen); - // We do not use the 1st token for EndId because of Speculative Decoding test design - // We skip 1st token because minLength is 1 - auto const endIdCol = 2 + (std::rand() % std::max(maxNewTokens - 2, 1)); + // Prefer skipping first 1–2 tokens, but clamp safely for small maxNewTokens + SizeType32 endIdCol = 0; + if (maxNewTokens <= 1) + { + endIdCol = 0; + } + else if (maxNewTokens == 2) + { + endIdCol = 1; + } + else + { + endIdCol = 2 + (std::rand() % (maxNewTokens - 2)); + } endIdIndex = firstOutputIndex + endIdCol; skippedEndId0 = expectedOutputData[firstOutputIndex]; skippedEndId1 = expectedOutputData[firstOutputIndex + 1]; endId = expectedOutputData[endIdIndex]; } while (endId == skippedEndId0 || endId == skippedEndId1); // Workaround: The first example has endIdIndex 14, where the generation logits are almost same at // token ids 257 and 373, which causes unstable generation results. Hence, we use the one previous // token as endId. if (bi == 0 && !replaceLogits) { endId = expectedOutputData[endIdIndex - 1]; } endIds.push_back(endId); } return endIds; }
🧹 Nitpick comments (1)
cpp/include/tensorrt_llm/executor/executor.h (1)
1482-1482
: Nice readability win; consider deriving from chrono to avoid magic literal.Digit separators help, but a chrono-derived value documents intent and prevents unit drift.
Apply optionally:
- static constexpr uint64_t kDefaultMaxSeqIdleMicroseconds = 180'000'000; + static constexpr uint64_t kDefaultMaxSeqIdleMicroseconds = + std::chrono::duration_cast<std::chrono::microseconds>(std::chrono::minutes(3)).count();
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
cpp/include/tensorrt_llm/batch_manager/llmRequest.h
(4 hunks)cpp/include/tensorrt_llm/executor/executor.h
(1 hunks)cpp/tensorrt_llm/runtime/bufferView.h
(1 hunks)cpp/tests/e2e_tests/batch_manager/trtGptModelRealDecoderTest.cpp
(8 hunks)cpp/tests/unit_tests/batch_manager/llmRequestTest.cpp
(1 hunks)
🧰 Additional context used
📓 Path-based instructions (7)
**/*.{h,hpp,hh,hxx,cpp,cxx,cc,cu,cuh}
📄 CodeRabbit inference engine (CODING_GUIDELINES.md)
**/*.{h,hpp,hh,hxx,cpp,cxx,cc,cu,cuh}
: Namespace closing braces must include a trailing comment with the namespace name (e.g., '} // namespace foo').
Prefer const or constexpr variables over #define for constants.
Declare variables that are not modified after initialization as const.
Avoid magic literals in code; except for 0, nullptr, true, false. Use named constants for comparisons and logic.
Use Allman brace style for formatting.
Place the semicolon of an empty for/while loop on a new line.
Bodies of switch/while/do-while/for must be compound statements (brace-delimited), and if/else must always be followed by brace-delimited statements.
Type names (e.g., classes) must be CamelCase starting with an uppercase letter (e.g., FooBar).
Local variables, methods, and namespaces use lowerCamelCase (e.g., localFooBar).
Non-magic-number global variables that are non-static and not in an anonymous namespace must be lowerCamelCase prefixed with 'g' (e.g., gDontUseGlobalFoos).
Non-magic-number globals that are static or in an anonymous namespace use lowerCamelCase prefixed with 's' (e.g., sMutableStaticGlobal).
Locally visible static variables use lowerCamelCase with 's' prefix (e.g., static std::once_flag sFlag).
Private/protected member variables use 'm' prefix with CamelCase (e.g., mNbFooValues). Public members may omit, but 'm' is encouraged for clarity.
Constants (enums, global constants, static constants, and function-scope magic/literal constants) use uppercase SNAKE_CASE with 'k' prefix (e.g., kDIGIT_NUM).
Function-scope constants that are not magic numbers or literals are named like non-constant variables (e.g., bool const pass = a && b).
If macros are necessary, name them in UPPER_SNAKE_CASE (e.g., FOO_VERSION) and prefer constants over #define.
Use LLVM clang-format; wrap lines at a maximum of 120 columns; use '// clang-format off/on' sparingly with justification.
Use smart pointers for heap allocations; prefer unique_ptr for sole ownership, shared_ptr for shared...
Files:
cpp/tests/unit_tests/batch_manager/llmRequestTest.cpp
cpp/tensorrt_llm/runtime/bufferView.h
cpp/include/tensorrt_llm/executor/executor.h
cpp/include/tensorrt_llm/batch_manager/llmRequest.h
cpp/tests/e2e_tests/batch_manager/trtGptModelRealDecoderTest.cpp
**/*.{cpp,cxx,cc,cu,h,hpp,hh,hxx,cuh}
📄 CodeRabbit inference engine (CODING_GUIDELINES.md)
C++ filenames should be lowerCamelCase (first letter lowercase) and must be case-insensitive unique within a compilation target.
Files:
cpp/tests/unit_tests/batch_manager/llmRequestTest.cpp
cpp/tensorrt_llm/runtime/bufferView.h
cpp/include/tensorrt_llm/executor/executor.h
cpp/include/tensorrt_llm/batch_manager/llmRequest.h
cpp/tests/e2e_tests/batch_manager/trtGptModelRealDecoderTest.cpp
**/*.{h,hpp,hh,hxx,cpp,cxx,cc,cu,cuh,py}
📄 CodeRabbit inference engine (CODING_GUIDELINES.md)
Use only spaces, no tabs; indent with 4 spaces.
Files:
cpp/tests/unit_tests/batch_manager/llmRequestTest.cpp
cpp/tensorrt_llm/runtime/bufferView.h
cpp/include/tensorrt_llm/executor/executor.h
cpp/include/tensorrt_llm/batch_manager/llmRequest.h
cpp/tests/e2e_tests/batch_manager/trtGptModelRealDecoderTest.cpp
**/*.{h,hpp,hh,hxx,cpp,cxx,cc}
📄 CodeRabbit inference engine (CODING_GUIDELINES.md)
**/*.{h,hpp,hh,hxx,cpp,cxx,cc}
: Prefer anonymous namespaces over 'static' for internal linkage of functions.
All templates (class/function/member/static) must be instantiated at least once; non-POD classes should have private data members.
Files:
cpp/tests/unit_tests/batch_manager/llmRequestTest.cpp
cpp/tensorrt_llm/runtime/bufferView.h
cpp/include/tensorrt_llm/executor/executor.h
cpp/include/tensorrt_llm/batch_manager/llmRequest.h
cpp/tests/e2e_tests/batch_manager/trtGptModelRealDecoderTest.cpp
**/*.{cpp,cxx,cc,h,hpp,hh,hxx,cu,cuh,py}
📄 CodeRabbit inference engine (CODING_GUIDELINES.md)
Prepend the NVIDIA Apache-2.0 copyright header with current year to the top of all source files (e.g., .cpp, .h, .cu, .py).
Files:
cpp/tests/unit_tests/batch_manager/llmRequestTest.cpp
cpp/tensorrt_llm/runtime/bufferView.h
cpp/include/tensorrt_llm/executor/executor.h
cpp/include/tensorrt_llm/batch_manager/llmRequest.h
cpp/tests/e2e_tests/batch_manager/trtGptModelRealDecoderTest.cpp
**/*.{h,hpp,hh,hxx}
📄 CodeRabbit inference engine (CODING_GUIDELINES.md)
Document new class interfaces and function prototypes with Doxygen; use //! for single-line and //!< for members.
Files:
cpp/tensorrt_llm/runtime/bufferView.h
cpp/include/tensorrt_llm/executor/executor.h
cpp/include/tensorrt_llm/batch_manager/llmRequest.h
**/*.{h,hpp,hh,hxx,cuh}
📄 CodeRabbit inference engine (CODING_GUIDELINES.md)
Use include guards named 'TRTLLM_<FILE_NAME_IN_CAPS_WITH_UNDERSCORES>_H' (no leading or trailing underscore; directory names excluded).
Files:
cpp/tensorrt_llm/runtime/bufferView.h
cpp/include/tensorrt_llm/executor/executor.h
cpp/include/tensorrt_llm/batch_manager/llmRequest.h
🧠 Learnings (1)
📓 Common learnings
Learnt from: venkywonka
PR: NVIDIA/TensorRT-LLM#6029
File: .github/pull_request_template.md:45-53
Timestamp: 2025-08-27T17:50:13.264Z
Learning: For PR templates in TensorRT-LLM, avoid suggesting changes that would increase developer overhead, such as converting plain bullets to mandatory checkboxes. The team prefers guidance-style bullets that don't require explicit interaction to reduce friction in the PR creation process.
🧬 Code graph analysis (2)
cpp/include/tensorrt_llm/batch_manager/llmRequest.h (1)
cpp/include/tensorrt_llm/executor/executor.h (4)
nodiscard
(271-304)nodiscard
(445-471)nodiscard
(1510-1782)nodiscard
(1885-1909)
cpp/tests/e2e_tests/batch_manager/trtGptModelRealDecoderTest.cpp (2)
cpp/tests/e2e_tests/batch_manager/trtGptModelTest.cpp (2)
trtGptModel
(108-131)trtGptModel
(108-109)cpp/tests/utils/common.h (1)
nbGivenInputs
(213-213)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Pre-commit Check
🔇 Additional comments (15)
cpp/include/tensorrt_llm/batch_manager/llmRequest.h (6)
2-2
: Header year bump looks correct.
32-33
: Includes justified.
<cstring>
for memcpy and<list>
for bad/stop words tensor creation are appropriate.
1118-1121
: Const/noexcept + explicit cast LGTM.
getNumDraftTokens()
now safe and clear.
1381-1384
: Const/noexcept accessor LGTM.
getGenerationLogitsFragmentsSize()
returns a sized type consistently.
1386-1389
: noexcept clear() LGTM.Throws no exceptions and matches container semantics.
1391-1394
: Const-correctness and [[nodiscard]] LGTM.
hasAdditionalOutputs()
is now side-effect free and expressive.cpp/tests/unit_tests/batch_manager/llmRequestTest.cpp (1)
59-59
: LGTM: switched to the new accessor getNumDraftTokens().This aligns the test with the updated public API.
cpp/tests/e2e_tests/batch_manager/trtGptModelRealDecoderTest.cpp (8)
331-334
: Signature simplification (drop modelType): OK.Callers now rely on pickRandomEndIds() to derive endIds; no regressions evident.
356-356
: Callsite updated to new pickRandomEndIds() path: OK.
412-414
: Overload update to remove modelType: OK.The tuple-returning helper matches the primary overload and keeps parameter order consistent.
426-428
: Delegation to primary loadTestData overload: OK.
642-644
: loadTestData call updated to new signature: OK.
664-666
: First runGptModelInference call updated to new signature: OK.
671-671
: Second runGptModelInference call updated to new signature: OK.
437-439
: All callsites updated (no stale modelType usages)
Ripgrep scan found no matches formodelType
inrunGptModelInference
,loadTestData
, orpickRandomEndIds
invocations.
@coderabbitai review |
✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
cpp/include/tensorrt_llm/batch_manager/createNewDecoderRequests.h (2)
44-45
: Make inheritance public to preserve Algorithm polymorphism.Currently it’s private (class default). Likely breaks code expecting CreateNewDecoderRequests as an Algorithm.
-class CreateNewDecoderRequests : Algorithm +class CreateNewDecoderRequests : public Algorithm
20-27
: Include missing headers for complete std::vector types
Add the defining headers sostd::vector<runtime::SamplingConfig>
andstd::vector<executor::LookaheadDecodingConfig>
use complete types:#include "tensorrt_llm/runtime/worldConfig.h" +#include "tensorrt_llm/runtime/samplingConfig.h" // for runtime::SamplingConfig +#include "tensorrt_llm/executor/executor.h" // for executor::DecodingConfig & LookaheadDecodingConfigAlso apply the same at lines 64–79.
🧹 Nitpick comments (5)
cpp/include/tensorrt_llm/batch_manager/createNewDecoderRequests.h (5)
64-71
: Mark operator() as [[nodiscard]] for symmetry and to prevent accidental discard.- operator()(runtime::ModelConfig const& modelConfig, runtime::WorldConfig const& worldConfig, + [[nodiscard]] operator()(runtime::ModelConfig const& modelConfig, runtime::WorldConfig const& worldConfig, executor::DecodingConfig const& decodingConfig, RequestVector const& contextRequests, nvinfer1::DataType logitsType, DecoderInputBuffers& inputBuffers, runtime::decoder::DecoderState& decoderState, CudaStream const& runtimeStream, CudaStream const& decoderStream, SizeType32 maxSequenceLength, SizeType32 beamWidth, OptionalRef<MedusaBuffers const> medusaBuffers) const;
47-48
: Prefer std::string_view for name.Avoids array type and matches common style for constexpr identifiers.
+#include <string_view> ... - constexpr static auto name{"CreateNewDecoderRequests"}; + static constexpr std::string_view name{"CreateNewDecoderRequests"};
52-54
: Use the alias consistently or remove it.SharedConstPtr is defined but not used in signatures.
Option A (use it):
- std::tuple<TensorPtr, std::vector<runtime::SamplingConfig>, std::vector<runtime::ITensor::SharedConstPtr>, + std::tuple<TensorPtr, std::vector<runtime::SamplingConfig>, std::vector<SharedConstPtr>, std::vector<executor::LookaheadDecodingConfig>>Option B: drop the alias if you prefer explicit types.
57-63
: Make ctor explicit; consider Options to replace tri-bool.Prevents accidental implicit conversions and improves call-site clarity.
- CreateNewDecoderRequests(bool speculativeDecodingFastLogits, bool isLeaderInOrchMode, bool isNormalizeLogProbs) + explicit CreateNewDecoderRequests(bool speculativeDecodingFastLogits, bool isLeaderInOrchMode, bool isNormalizeLogProbs)If desired, I can sketch a CreateNewDecoderRequests::Options struct to replace the three bools.
28-31
: Remove redundant forward-declare if you include samplingConfig.h.If the header is included as suggested, this forward declaration becomes unnecessary.
-namespace tensorrt_llm::runtime -{ -class SamplingConfig; -``` +// SamplingConfig defined via #include "tensorrt_llm/runtime/samplingConfig.h"
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
cpp/include/tensorrt_llm/batch_manager/createNewDecoderRequests.h
(1 hunks)cpp/include/tensorrt_llm/executor/executor.h
(1 hunks)cpp/tensorrt_llm/batch_manager/createNewDecoderRequests.cpp
(0 hunks)
💤 Files with no reviewable changes (1)
- cpp/tensorrt_llm/batch_manager/createNewDecoderRequests.cpp
🚧 Files skipped from review as they are similar to previous changes (1)
- cpp/include/tensorrt_llm/executor/executor.h
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Pre-commit Check
🔇 Additional comments (1)
cpp/include/tensorrt_llm/batch_manager/createNewDecoderRequests.h (1)
2-2
: License year bump looks good.
PR_Github #18046 [ run ] completed with state |
/bot run |
PR_Github #18621 [ run ] triggered by Bot |
PR_Github #18621 [ run ] completed with state |
b279db4
to
3d6cc19
Compare
@coderabbitai review |
✅ Actions performedReview triggered.
|
/bot run |
PR_Github #18779 [ run ] triggered by Bot |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (3)
cpp/include/tensorrt_llm/runtime/lookaheadModule.h (1)
44-47
: Return-by-const-ref + [[nodiscard]]: good; add noexcept and document thread-safety.Accessor can’t throw—mark it noexcept. Also, returning a reference changes concurrency semantics vs prior copy; ensure
mExecutionConfig
is write-once before concurrent reads, or document required external synchronization.Apply this diff:
- [[nodiscard]] executor::LookaheadDecodingConfig const& getExecutionConfig() const + [[nodiscard]] executor::LookaheadDecodingConfig const& getExecutionConfig() const noexceptcpp/include/tensorrt_llm/batch_manager/createNewDecoderRequests.h (2)
65-71
: Prefer a named result type over a 4-tuple for readability and API stability.The widened tuple increases call‑site ambiguity. Consider a small struct with named fields.
Example:
- [[nodiscard]] std::tuple<TensorPtr, std::vector<SamplingConfig>, std::vector<SharedConstPtr>, - std::vector<executor::LookaheadDecodingConfig>> - operator(... ) const; + struct OpResult { + TensorPtr inputIds; + std::vector<SamplingConfig> samplingConfigs; + std::vector<SharedConstPtr> decoderInputs; + std::vector<executor::LookaheadDecodingConfig> lookaheadConfigs; + }; + [[nodiscard]] OpResult operator(... ) const;
73-79
: Minor readability: add a local alias for LookaheadDecodingConfig.Keeps signatures concise and consistent with existing aliases.
Apply this diff:
using TensorPtr = runtime::ITensor::SharedPtr; using SharedConstPtr = runtime::ITensor::SharedConstPtr; + using LookaheadDecodingConfig = tensorrt_llm::executor::LookaheadDecodingConfig;
- [[nodiscard]] std::tuple<std::vector<SharedConstPtr>, std::vector<executor::LookaheadDecodingConfig>> + [[nodiscard]] std::tuple<std::vector<SharedConstPtr>, std::vector<LookaheadDecodingConfig>> createDecoderRequests(...And likewise for the
operator()
return type above.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (6)
cpp/include/tensorrt_llm/batch_manager/createNewDecoderRequests.h
(3 hunks)cpp/include/tensorrt_llm/batch_manager/llmRequest.h
(5 hunks)cpp/include/tensorrt_llm/executor/executor.h
(1 hunks)cpp/include/tensorrt_llm/runtime/lookaheadModule.h
(1 hunks)cpp/include/tensorrt_llm/runtime/modelConfig.h
(1 hunks)cpp/tensorrt_llm/batch_manager/createNewDecoderRequests.cpp
(0 hunks)
💤 Files with no reviewable changes (1)
- cpp/tensorrt_llm/batch_manager/createNewDecoderRequests.cpp
✅ Files skipped from review due to trivial changes (1)
- cpp/include/tensorrt_llm/runtime/modelConfig.h
🚧 Files skipped from review as they are similar to previous changes (2)
- cpp/include/tensorrt_llm/executor/executor.h
- cpp/include/tensorrt_llm/batch_manager/llmRequest.h
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Pre-commit Check
🔇 Additional comments (3)
cpp/include/tensorrt_llm/batch_manager/createNewDecoderRequests.h (2)
2-2
: License year bump: LGTM.
23-23
: Including executor/executor.h is appropriate for the new executor types.cpp/include/tensorrt_llm/runtime/lookaheadModule.h (1)
29-37
: noexcept safe — default LookaheadDecodingConfig is non-throwingLookaheadDecodingConfig() delegates to LookaheadDecodingConfig(kDefaultLookaheadDecodingWindow, kDefaultLookaheadDecodingNgram, kDefaultLookaheadDecodingVerificationSet); the three-arg ctor performs runtime checks that succeed for those constants, so default construction will not throw and keeping LookaheadModule ctors noexcept is safe. See cpp/include/tensorrt_llm/executor/executor.h and cpp/tensorrt_llm/executor/decodingConfig.cpp.
PR_Github #18779 [ run ] completed with state |
/bot run |
PR_Github #18923 [ run ] triggered by Bot |
PR_Github #18923 [ run ] completed with state |
/bot run |
PR_Github #20371 [ run ] completed with state |
/bot run |
PR_Github #20380 [ run ] triggered by Bot |
PR_Github #20380 [ run ] completed with state |
/bot run |
PR_Github #20445 [ run ] triggered by Bot |
PR_Github #20445 [ run ] completed with state |
/bot run |
PR_Github #20448 [ run ] triggered by Bot |
PR_Github #20448 [ run ] completed with state |
…by removing redundant parameters Signed-off-by: Robin Kobus <19427718+Funatiq@users.noreply.github.com>
Signed-off-by: Robin Kobus <19427718+Funatiq@users.noreply.github.com>
- Updated the out-of-range exception message to provide clearer context by specifying both the offset and size, enhancing readability and debugging ease. Signed-off-by: Robin Kobus <19427718+Funatiq@users.noreply.github.com>
…specifications - Added <cstring> and <list> includes for improved functionality. - Updated function signatures to include noexcept and [[nodiscard]] attributes for better performance and safety. - Removed redundant error checks to streamline the code. Signed-off-by: Robin Kobus <19427718+Funatiq@users.noreply.github.com>
- Updated copyright year from 2024 to 2025. - Removed unused includes for DecodingInput, DecodingOutput, GptDecoderBatched, and SpeculativeDecodingMode to streamline the code. Signed-off-by: Robin Kobus <19427718+Funatiq@users.noreply.github.com>
Signed-off-by: Robin Kobus <19427718+Funatiq@users.noreply.github.com>
- Moved the kGENERATION_TO_COMPLETE state definition to maintain consistent ordering within the enum. - Ensured clarity in the state transitions for better code readability. Signed-off-by: Robin Kobus <19427718+Funatiq@users.noreply.github.com>
/bot run |
PR_Github #20464 [ run ] triggered by Bot |
PR_Github #20464 [ run ] completed with state |
/bot run --disable-fail-fast |
PR_Github #20520 [ run ] triggered by Bot |
PR_Github #20520 [ run ] completed with state |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Signed-off-by: Robin Kobus <19427718+Funatiq@users.noreply.github.com>
Summary by CodeRabbit
Description
Test Coverage
PR Checklist
Please review the following before submitting your PR:
PR description clearly explains what and why. If using CodeRabbit's summary, please make sure it makes sense.
PR Follows TRT-LLM CODING GUIDELINES to the best of your knowledge.
Test cases are provided for new code paths (see test instructions)
Any new dependencies have been scanned for license and vulnerabilities
CODEOWNERS updated if ownership changes
Documentation updated as needed
The reviewers assigned automatically/manually are appropriate for the PR.
Please check this after reviewing the above items as appropriate for this PR.
GitHub Bot Help
/bot [-h] ['run', 'kill', 'skip', 'reuse-pipeline'] ...
Provide a user friendly way for developers to interact with a Jenkins server.
Run
/bot [-h|--help]
to print this help message.See details below for each supported subcommand.
run [--reuse-test (optional)pipeline-id --disable-fail-fast --skip-test --stage-list "A10-PyTorch-1, xxx" --gpu-type "A30, H100_PCIe" --test-backend "pytorch, cpp" --add-multi-gpu-test --only-multi-gpu-test --disable-multi-gpu-test --post-merge --extra-stage "H100_PCIe-TensorRT-Post-Merge-1, xxx" --detailed-log --debug(experimental)]
Launch build/test pipelines. All previously running jobs will be killed.
--reuse-test (optional)pipeline-id
(OPTIONAL) : Allow the new pipeline to reuse build artifacts and skip successful test stages from a specified pipeline or the last pipeline if no pipeline-id is indicated. If the Git commit ID has changed, this option will be always ignored. The DEFAULT behavior of the bot is to reuse build artifacts and successful test results from the last pipeline.--disable-reuse-test
(OPTIONAL) : Explicitly prevent the pipeline from reusing build artifacts and skipping successful test stages from a previous pipeline. Ensure that all builds and tests are run regardless of previous successes.--disable-fail-fast
(OPTIONAL) : Disable fail fast on build/tests/infra failures.--skip-test
(OPTIONAL) : Skip all test stages, but still run build stages, package stages and sanity check stages. Note: Does NOT update GitHub check status.--stage-list "A10-PyTorch-1, xxx"
(OPTIONAL) : Only run the specified test stages. Examples: "A10-PyTorch-1, xxx". Note: Does NOT update GitHub check status.--gpu-type "A30, H100_PCIe"
(OPTIONAL) : Only run the test stages on the specified GPU types. Examples: "A30, H100_PCIe". Note: Does NOT update GitHub check status.--test-backend "pytorch, cpp"
(OPTIONAL) : Skip test stages which don't match the specified backends. Only support [pytorch, cpp, tensorrt, triton]. Examples: "pytorch, cpp" (does not run test stages with tensorrt or triton backend). Note: Does NOT update GitHub pipeline status.--only-multi-gpu-test
(OPTIONAL) : Only run the multi-GPU tests. Note: Does NOT update GitHub check status.--disable-multi-gpu-test
(OPTIONAL) : Disable the multi-GPU tests. Note: Does NOT update GitHub check status.--add-multi-gpu-test
(OPTIONAL) : Force run the multi-GPU tests in addition to running L0 pre-merge pipeline.--post-merge
(OPTIONAL) : Run the L0 post-merge pipeline instead of the ordinary L0 pre-merge pipeline.--extra-stage "H100_PCIe-TensorRT-Post-Merge-1, xxx"
(OPTIONAL) : Run the ordinary L0 pre-merge pipeline and specified test stages. Examples: --extra-stage "H100_PCIe-TensorRT-Post-Merge-1, xxx".--detailed-log
(OPTIONAL) : Enable flushing out all logs to the Jenkins console. This will significantly increase the log volume and may slow down the job.--debug
(OPTIONAL) : Experimental feature. Enable access to the CI container for debugging purpose. Note: Specify exactly one stage in thestage-list
parameter to access the appropriate container environment. Note: Does NOT update GitHub check status.For guidance on mapping tests to stage names, see
docs/source/reference/ci-overview.md
and the
scripts/test_to_stage_mapping.py
helper.kill
kill
Kill all running builds associated with pull request.
skip
skip --comment COMMENT
Skip testing for latest commit on pull request.
--comment "Reason for skipping build/test"
is required. IMPORTANT NOTE: This is dangerous since lack of user care and validation can cause top of tree to break.reuse-pipeline
reuse-pipeline
Reuse a previous pipeline to validate current commit. This action will also kill all currently running builds associated with the pull request. IMPORTANT NOTE: This is dangerous since lack of user care and validation can cause top of tree to break.