Skip to content

Conversation

xinhe-nv
Copy link
Collaborator

@xinhe-nv xinhe-nv commented Jul 23, 2025

skil llama3.3 70B test on CG4

Summary by CodeRabbit

  • Tests
    • Improved test stability by skipping tests on systems with less than 1TB host memory.
    • Updated device compatibility markers for specific test methods.
    • Enhanced GPU memory management during testing for better resource utilization.

@xinhe-nv xinhe-nv requested review from syuoni, yuxianq and LarryXFly July 23, 2025 09:13
Copy link
Contributor

coderabbitai bot commented Jul 23, 2025

📝 Walkthrough

"""

Walkthrough

A test class in the integration suite was updated to add a skip marker based on host memory, replace device-specific skip decorators with custom ones, and modify a test method to instantiate an object with an explicit configuration for GPU memory usage. The rest of the test logic remains unchanged.

Changes

File(s) Change Summary
tests/integration/defs/accuracy/test_llm_api_pytorch.py Added class-level skip marker for host memory; replaced device skip decorators with custom ones; updated LLM instantiation in one test method to include KvCacheConfig.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~7 minutes

Suggested reviewers

  • crazydemo
  • LarryXFly
    """
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai or @coderabbitai title anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@xinhe-nv xinhe-nv changed the title test: fix llama3.3 70b test device test: skip llama3.3 70b test on cg4 Jul 23, 2025
@xinhe-nv xinhe-nv enabled auto-merge (squash) July 23, 2025 09:14
@xinhe-nv
Copy link
Collaborator Author

/bot run

@tensorrt-cicd
Copy link
Collaborator

PR_Github #12695 [ run ] triggered by Bot

@tensorrt-cicd
Copy link
Collaborator

PR_Github #12695 [ run ] completed with state SUCCESS
/LLM/main/L0_MergeRequest_PR pipeline #9444 completed with status: 'FAILURE'

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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 (1)
tests/integration/defs/accuracy/test_llm_api_pytorch.py (1)

342-343: LGTM! Memory-based skip marker correctly addresses CG4 limitations.

The skip marker and explanatory comment effectively implement the PR objective of preventing system crashes on CG4 hardware with insufficient host memory. The 1TB requirement is well-justified given CG4's 800G total with 480G shared with GPUs.

Fix the line length violation:

-# 1TB is basic requirement for large model tests. CG4 120G only has 800G host memory, and 480G is shared with GPUs. the test will cause the system crash.
+# 1TB is basic requirement for large model tests. CG4 120G only has 800G host memory,
+# and 480G is shared with GPUs. The test will cause the system crash.
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3463b6c and 7b8e7b3.

📒 Files selected for processing (4)
  • tests/integration/defs/accuracy/test_llm_api_pytorch.py (3 hunks)
  • tests/integration/defs/conftest.py (1 hunks)
  • tests/integration/defs/examples/test_bert.py (1 hunks)
  • tests/integration/defs/examples/test_bindings.py (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (3)
  • tests/integration/defs/examples/test_bert.py
  • tests/integration/defs/conftest.py
  • tests/integration/defs/examples/test_bindings.py
🧰 Additional context used
📓 Path-based instructions (2)
**/*.py

📄 CodeRabbit Inference Engine (CODING_GUIDELINES.md)

**/*.py: Python code should conform to Python 3.8+.
Indent Python code with 4 spaces. Do not use tabs.
Always maintain the namespace when importing in Python, even if only one class or function from a module is used.
Python filenames should use snake_case (e.g., some_file.py).
Python classes should use PascalCase (e.g., class SomeClass).
Python functions and methods should use snake_case (e.g., def my_awesome_function():).
Python local variables should use snake_case. Prefix k for variable names that start with a number (e.g., k_99th_percentile = ...).
Python global variables should use upper snake_case and prefix G (e.g., G_MY_GLOBAL = ...).
Python constants should use upper snake_case (e.g., MY_CONSTANT = ...).
Avoid shadowing variables declared in an outer scope in Python.
Initialize all externally visible members of a Python class in the constructor.
For interfaces that may be used outside a Python file, prefer docstrings over comments.
Comments in Python should be reserved for code within a function, or interfaces that are local to a file.
Use Google style docstrings for Python classes and functions, which can be parsed by Sphinx.
Attributes and variables in Python can be documented inline; attribute docstrings will be rendered under the docstring for the class.
Avoid using reflection in Python when functionality can be easily achieved without it.
When using try-except blocks in Python, limit the except to the smallest set of errors possible.
When using try-except blocks to handle multiple possible variable types in Python, keep the body of the try as small as possible, using the else block to implement the logic.

Files:

  • tests/integration/defs/accuracy/test_llm_api_pytorch.py
**/*.{cpp,h,hpp,cc,cxx,cu,py}

📄 CodeRabbit Inference Engine (CODING_GUIDELINES.md)

All TensorRT-LLM Open Source Software code should contain an NVIDIA copyright header that includes the current year. This includes .cpp, .h, .cu, .py, and any other source files which are compiled or interpreted.

Files:

  • tests/integration/defs/accuracy/test_llm_api_pytorch.py
🪛 Ruff (0.12.2)
tests/integration/defs/accuracy/test_llm_api_pytorch.py

343-343: Line too long (153 > 120)

(E501)

🔇 Additional comments (3)
tests/integration/defs/accuracy/test_llm_api_pytorch.py (3)

360-360: Good refactoring! Semantic skip decorator improves maintainability.

Replacing the explicit device list with @skip_pre_hopper makes the code more readable and follows the DRY principle. This semantic approach is easier to maintain than hardcoded device lists.


363-366: Practical memory configuration improves test stability.

Adding explicit KvCacheConfig with free_gpu_memory_fraction=0.6 is a sensible adjustment for the 70B model on 4 GPUs. This reserves sufficient memory headroom to prevent OOM issues while maintaining test functionality.


377-377: Consistent refactoring with semantic skip decorators.

The replacement of explicit device list with @skip_pre_blackwell maintains consistency with the semantic decorator approach used elsewhere in the changes. This improves code maintainability and readability.

@xinhe-nv
Copy link
Collaborator Author

/bot run

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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 (1)
tests/integration/defs/accuracy/test_llm_api_pytorch.py (1)

342-343: Fix line length violation in comment.

The comment exceeds the 120-character limit. Consider breaking it into multiple lines for better readability and compliance with coding standards.

-# 1TB is basic requirement for large model tests. CG4 120G only has 800G host memory, and 480G is shared with GPUs. the test will cause the system crash.
+# 1TB is basic requirement for large model tests. CG4 120G only has 800G host memory,
+# and 480G is shared with GPUs. The test will cause the system crash.
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7b8e7b3 and 4e6ddf2.

📒 Files selected for processing (1)
  • tests/integration/defs/accuracy/test_llm_api_pytorch.py (3 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
**/*.py

📄 CodeRabbit Inference Engine (CODING_GUIDELINES.md)

**/*.py: Python code should conform to Python 3.8+.
Indent Python code with 4 spaces. Do not use tabs.
Always maintain the namespace when importing in Python, even if only one class or function from a module is used.
Python filenames should use snake_case (e.g., some_file.py).
Python classes should use PascalCase (e.g., class SomeClass).
Python functions and methods should use snake_case (e.g., def my_awesome_function():).
Python local variables should use snake_case. Prefix k for variable names that start with a number (e.g., k_99th_percentile = ...).
Python global variables should use upper snake_case and prefix G (e.g., G_MY_GLOBAL = ...).
Python constants should use upper snake_case (e.g., MY_CONSTANT = ...).
Avoid shadowing variables declared in an outer scope in Python.
Initialize all externally visible members of a Python class in the constructor.
For interfaces that may be used outside a Python file, prefer docstrings over comments.
Comments in Python should be reserved for code within a function, or interfaces that are local to a file.
Use Google style docstrings for Python classes and functions, which can be parsed by Sphinx.
Attributes and variables in Python can be documented inline; attribute docstrings will be rendered under the docstring for the class.
Avoid using reflection in Python when functionality can be easily achieved without it.
When using try-except blocks in Python, limit the except to the smallest set of errors possible.
When using try-except blocks to handle multiple possible variable types in Python, keep the body of the try as small as possible, using the else block to implement the logic.

Files:

  • tests/integration/defs/accuracy/test_llm_api_pytorch.py
**/*.{cpp,h,hpp,cc,cxx,cu,py}

📄 CodeRabbit Inference Engine (CODING_GUIDELINES.md)

All TensorRT-LLM Open Source Software code should contain an NVIDIA copyright header that includes the current year. This includes .cpp, .h, .cu, .py, and any other source files which are compiled or interpreted.

Files:

  • tests/integration/defs/accuracy/test_llm_api_pytorch.py
🪛 Ruff (0.12.2)
tests/integration/defs/accuracy/test_llm_api_pytorch.py

343-343: Line too long (153 > 120)

(E501)

🔇 Additional comments (3)
tests/integration/defs/accuracy/test_llm_api_pytorch.py (3)

360-360: Good refactoring to use semantic skip decorators.

Replacing device-specific lists with @skip_pre_hopper improves code maintainability and readability. This aligns with the existing pattern used throughout the codebase.


363-366: Appropriate memory configuration for large model testing.

Adding explicit KvCacheConfig with free_gpu_memory_fraction=0.6 is a sensible optimization for the 70B model test, ensuring adequate memory headroom for successful execution.


377-377: Consistent refactoring to semantic skip decorators.

The change from device-specific @pytest.mark.skip_device_not_contain(["B200"]) to @skip_pre_blackwell maintains consistency with the previous refactoring and improves code maintainability.

@tensorrt-cicd
Copy link
Collaborator

PR_Github #12838 [ run ] triggered by Bot

@tensorrt-cicd
Copy link
Collaborator

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

@xinhe-nv
Copy link
Collaborator Author

/bot run

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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 (1)
tests/integration/defs/accuracy/test_llm_api_pytorch.py (1)

342-343: Fix line length violation and improve comment formatting.

The host memory skip marker and explanatory comment are valuable additions that address the previous review feedback. However, the comment exceeds the 120-character line limit.

 @pytest.mark.timeout(7200)
 @pytest.mark.skip_less_host_memory(1000000)
-# 1TB is basic requirement for large model tests. CG4 120G only has 800G host memory, and 480G is shared with GPUs. the test will cause the system crash.
+# 1TB is basic requirement for large model tests. CG4 120G only has 800G host memory,
+# and 480G is shared with GPUs. The test will cause the system crash.
 class TestLlama3_3_70BInstruct(LlmapiAccuracyTestHarness):
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4e6ddf2 and e627556.

📒 Files selected for processing (1)
  • tests/integration/defs/accuracy/test_llm_api_pytorch.py (3 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
**/*.py

📄 CodeRabbit Inference Engine (CODING_GUIDELINES.md)

**/*.py: Python code should conform to Python 3.8+.
Indent Python code with 4 spaces. Do not use tabs.
Always maintain the namespace when importing in Python, even if only one class or function from a module is used.
Python filenames should use snake_case (e.g., some_file.py).
Python classes should use PascalCase (e.g., class SomeClass).
Python functions and methods should use snake_case (e.g., def my_awesome_function():).
Python local variables should use snake_case. Prefix k for variable names that start with a number (e.g., k_99th_percentile = ...).
Python global variables should use upper snake_case and prefix G (e.g., G_MY_GLOBAL = ...).
Python constants should use upper snake_case (e.g., MY_CONSTANT = ...).
Avoid shadowing variables declared in an outer scope in Python.
Initialize all externally visible members of a Python class in the constructor.
For interfaces that may be used outside a Python file, prefer docstrings over comments.
Comments in Python should be reserved for code within a function, or interfaces that are local to a file.
Use Google style docstrings for Python classes and functions, which can be parsed by Sphinx.
Attributes and variables in Python can be documented inline; attribute docstrings will be rendered under the docstring for the class.
Avoid using reflection in Python when functionality can be easily achieved without it.
When using try-except blocks in Python, limit the except to the smallest set of errors possible.
When using try-except blocks to handle multiple possible variable types in Python, keep the body of the try as small as possible, using the else block to implement the logic.

Files:

  • tests/integration/defs/accuracy/test_llm_api_pytorch.py
**/*.{cpp,h,hpp,cc,cxx,cu,py}

📄 CodeRabbit Inference Engine (CODING_GUIDELINES.md)

All TensorRT-LLM Open Source Software code should contain an NVIDIA copyright header that includes the current year. This includes .cpp, .h, .cu, .py, and any other source files which are compiled or interpreted.

Files:

  • tests/integration/defs/accuracy/test_llm_api_pytorch.py
🪛 Ruff (0.12.2)
tests/integration/defs/accuracy/test_llm_api_pytorch.py

343-343: Line too long (153 > 120)

(E501)

🔇 Additional comments (3)
tests/integration/defs/accuracy/test_llm_api_pytorch.py (3)

360-360: LGTM: Semantic decorator improves maintainability.

Replacing the device-specific skip decorator with @skip_pre_hopper makes the code more maintainable and semantic. This abstraction allows for centralized device compatibility logic.


363-366: LGTM: Explicit memory configuration improves test reliability.

Adding KvCacheConfig with free_gpu_memory_fraction=0.6 provides explicit GPU memory management for the large 70B model test. This configuration should help prevent out-of-memory issues during test execution.


377-377: LGTM: Consistent semantic decorator usage.

Replacing the B200-specific skip decorator with @skip_pre_blackwell maintains consistency with the previous decorator refactoring and improves code maintainability.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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 (1)
tests/integration/defs/accuracy/test_llm_api_pytorch.py (1)

342-343: LGTM! Host memory skip marker correctly addresses CG4 limitations.

The skip marker and explanatory comment effectively address the PR objective to skip the llama3.3 70B test on CG4 systems with insufficient host memory. The explanation aligns with the past review discussion about the 1TB requirement.

Consider breaking the long comment to comply with the 120-character line limit:

-# 1TB is basic requirement for large model tests. CG4 120G only has 800G host memory, and 480G is shared with GPUs. the test will cause the system crash.
+# 1TB is basic requirement for large model tests. CG4 120G only has 800G host memory,
+# and 480G is shared with GPUs. The test will cause the system crash.
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e627556 and 4d10e51.

📒 Files selected for processing (1)
  • tests/integration/defs/accuracy/test_llm_api_pytorch.py (3 hunks)
🧰 Additional context used
🪛 Ruff (0.12.2)
tests/integration/defs/accuracy/test_llm_api_pytorch.py

343-343: Line too long (153 > 120)

(E501)

🔇 Additional comments (3)
tests/integration/defs/accuracy/test_llm_api_pytorch.py (3)

360-360: Good refactoring to use semantic skip decorator.

Replacing the device-specific skip decorator with @skip_pre_hopper improves code maintainability by using a more semantic decorator that captures the intent (requiring Hopper or newer architecture) rather than listing specific device models.


363-366: Appropriate memory optimization for large model testing.

Adding the KvCacheConfig with free_gpu_memory_fraction=0.6 is a sensible memory management optimization for the 70B model. This configuration helps ensure the test can run successfully on 4 GPUs without encountering out-of-memory issues.


377-377: Consistent refactoring to semantic skip decorator.

Replacing the B200-specific skip decorator with @skip_pre_blackwell maintains consistency with the previous refactoring and improves code maintainability by using semantic architecture-based skip conditions.

@tensorrt-cicd
Copy link
Collaborator

PR_Github #12862 [ run ] triggered by Bot

@tensorrt-cicd
Copy link
Collaborator

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

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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 (1)
tests/integration/defs/accuracy/test_llm_api_pytorch.py (1)

342-343: LGTM! Host memory requirement properly documented.

The skip decorator and explanatory comment address the CG4 memory constraints effectively.

Consider breaking the long comment to adhere to line length limits:

-# 1TB is basic requirement for large model tests. CG4 120G only has 800G host memory, and 480G is shared with GPUs. the test will cause the system crash.
+# 1TB is basic requirement for large model tests. CG4 120G only has 800G host memory,
+# and 480G is shared with GPUs. The test will cause system crash on insufficient memory.
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4d10e51 and 9debf18.

📒 Files selected for processing (1)
  • tests/integration/defs/accuracy/test_llm_api_pytorch.py (3 hunks)
🧰 Additional context used
🪛 Ruff (0.12.2)
tests/integration/defs/accuracy/test_llm_api_pytorch.py

343-343: Line too long (153 > 120)

(E501)

⏰ 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)
tests/integration/defs/accuracy/test_llm_api_pytorch.py (3)

360-360: Good improvement: Architecture-based skip is more maintainable.

Replacing device-specific skip decorators with architecture-based ones (@skip_pre_hopper) improves code maintainability and semantic clarity.


363-366: Appropriate memory optimization for large model testing.

The explicit KV cache configuration with 60% GPU memory fraction is a sensible addition for the 70B model to prevent OOM issues during testing.


377-377: Consistent improvement: Architecture-based skip enhances maintainability.

The replacement of device-specific skip with @skip_pre_blackwell follows the same maintainability improvement pattern as the previous decorator change.

@tensorrt-cicd
Copy link
Collaborator

PR_Github #12916 [ reuse-pipeline ] triggered by Bot

@tensorrt-cicd
Copy link
Collaborator

PR_Github #12916 [ reuse-pipeline ] completed with state SUCCESS
Reusing PR_Github #12862 for commit 9debf18

@xinhe-nv
Copy link
Collaborator Author

/bot reuse-pipeline

@tensorrt-cicd
Copy link
Collaborator

PR_Github #12920 [ reuse-pipeline ] triggered by Bot

xinhe-nv added 2 commits July 24, 2025 18:51
Signed-off-by: Xin He (SW-GPU) <[email protected]>
@xinhe-nv
Copy link
Collaborator Author

/bot reuse-pipeline

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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 (1)
tests/integration/defs/accuracy/test_llm_api_pytorch.py (1)

342-343: Good addition of explanatory comment, but fix line length.

The added host memory skip marker and explanatory comment effectively address the previous review feedback. However, the comment exceeds the 120-character line limit.

Apply this diff to fix the line length:

-# 1TB is basic requirement for large model tests. CG4 120G only has 800G host memory, and 480G is shared with GPUs. the test will cause the system crash.
+# 1TB is basic requirement for large model tests. CG4 120G only has 800G host memory, 
+# and 480G is shared with GPUs. The test will cause the system crash.
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9debf18 and 2b5a103.

📒 Files selected for processing (1)
  • tests/integration/defs/accuracy/test_llm_api_pytorch.py (3 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
**/*.py

📄 CodeRabbit Inference Engine (CODING_GUIDELINES.md)

**/*.py: Python code should conform to Python 3.8+.
Indent Python code with 4 spaces. Do not use tabs.
Always maintain the namespace when importing in Python, even if only one class or function from a module is used.
Python filenames should use snake_case (e.g., some_file.py).
Python classes should use PascalCase (e.g., class SomeClass).
Python functions and methods should use snake_case (e.g., def my_awesome_function():).
Python local variables should use snake_case. Prefix k for variable names that start with a number (e.g., k_99th_percentile).
Python global variables should use upper snake_case and prefix G (e.g., G_MY_GLOBAL).
Python constants should use upper snake_case (e.g., MY_CONSTANT).
Avoid shadowing variables declared in an outer scope in Python.
Initialize all externally visible members of a Python class in the constructor.
For interfaces that may be used outside a Python file, prefer docstrings over comments.
Comments in Python should be reserved for code within a function, or interfaces that are local to a file.
Use Google style docstrings for Python classes and functions, which can be parsed by Sphinx.
Attributes and variables in Python can be documented inline; attribute docstrings will be rendered under the docstring for the class.
Avoid using reflection in Python when functionality can be easily achieved without it.
When using try-except blocks in Python, limit the except to the smallest set of errors possible.
When using try-except blocks to handle multiple possible variable types in Python, keep the body of the try as small as possible, using the else block to implement the logic.

Files:

  • tests/integration/defs/accuracy/test_llm_api_pytorch.py
**/*.{cpp,h,hpp,cc,cxx,cu,py}

📄 CodeRabbit Inference Engine (CODING_GUIDELINES.md)

All TensorRT-LLM Open Source Software code should contain an NVIDIA copyright header that includes the current year. This includes .cpp, .h, .cu, .py, and any other source files which are compiled or interpreted.

Files:

  • tests/integration/defs/accuracy/test_llm_api_pytorch.py
🪛 Ruff (0.12.2)
tests/integration/defs/accuracy/test_llm_api_pytorch.py

343-343: Line too long (153 > 120)

(E501)

🔇 Additional comments (3)
tests/integration/defs/accuracy/test_llm_api_pytorch.py (3)

360-360: Good abstraction with custom skip decorator.

Replacing the device-specific skip decorator with @skip_pre_hopper improves code maintainability by using a semantic abstraction rather than hardcoded device lists.


363-366: Appropriate memory configuration for large model testing.

The explicit KV cache configuration with free_gpu_memory_fraction=0.6 is a good practice for large model tests, helping prevent OOM issues by reserving adequate memory space for the 70B model.


377-377: Good abstraction with custom skip decorator.

Replacing the device-specific skip decorator with @skip_pre_blackwell improves code maintainability by using a semantic abstraction rather than hardcoded device lists.

@tensorrt-cicd
Copy link
Collaborator

PR_Github #12920 [ reuse-pipeline ] completed with state SUCCESS
Reusing PR_Github #12862 for commit 822af12

@tensorrt-cicd
Copy link
Collaborator

PR_Github #12922 [ reuse-pipeline ] triggered by Bot

@tensorrt-cicd
Copy link
Collaborator

PR_Github #12922 [ reuse-pipeline ] completed with state FAILURE
Can't reuse PR_Github #0 with status: UNKNOWN

@xinhe-nv
Copy link
Collaborator Author

/bot reuse-pipeline

@tensorrt-cicd
Copy link
Collaborator

PR_Github #12925 [ reuse-pipeline ] triggered by Bot

@tensorrt-cicd
Copy link
Collaborator

PR_Github #12925 [ reuse-pipeline ] completed with state SUCCESS
Reusing PR_Github #12862 for commit 2b5a103

@xinhe-nv xinhe-nv merged commit 2dcfa90 into NVIDIA:main Jul 25, 2025
3 checks passed
@xinhe-nv xinhe-nv deleted the user/xinhe/fix branch July 25, 2025 02:30
NVShreyas pushed a commit to NVShreyas/TensorRT-LLM that referenced this pull request Jul 28, 2025
Signed-off-by: Xin He (SW-GPU) <[email protected]>
Signed-off-by: Shreyas Misra <[email protected]>
Ransiki pushed a commit to Ransiki/TensorRT-LLM that referenced this pull request Jul 29, 2025
Signed-off-by: Xin He (SW-GPU) <[email protected]>
Signed-off-by: Ransiki Zhang <[email protected]>
lancelly pushed a commit to lancelly/TensorRT-LLM that referenced this pull request Aug 6, 2025
Signed-off-by: Xin He (SW-GPU) <[email protected]>
Signed-off-by: Lanyu Liao <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants