use static signature for sfd_col_d_srelu_tensor#281
Open
jiemingz wants to merge 1 commit into
Open
Conversation
Signed-off-by: Jieming Zhang <jiemingz@nvidia.com>
Collaborator
|
@cudnn-ci-bot run |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
python/cudnn/grouped_gemm/grouped_gemm_dsrelu/api.py (1)
1483-1493: ⚡ Quick winAdd documentation explaining the dimension selection logic.
The helper omits dimension 4 from the static shape and marks stride dimensions 2 and 5 as dynamic, but the rationale for this specific selection is not documented. Consider adding a docstring or inline comment explaining:
- Why dimension 4 (rest_m) is excluded from the static shape
- Why stride dimensions 2 and 5 are treated as dynamic
- How this relates to the SFD column tensor structure
This would improve maintainability and help future developers understand the cache key granularity design. As per coding guidelines, documentation is a key focus area for this module.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@python/cudnn/grouped_gemm/grouped_gemm_dsrelu/api.py` around lines 1483 - 1493, Add a short docstring or inline comment to dynamic_sfd_col_tensor_signature explaining the dimension-selection rationale: state that static_shape intentionally omits dimension 4 (rest_m) because rest_m varies per-column and should not be part of the cache key, and that dynamic_stride_dims=(2, 5) marks the stride-related dimensions (the inner M chunk and the leading stride for packed layout) as dynamic because their strides can vary even when logical sizes match; also mention how this choice maps to the SFD column tensor layout and why it yields the desired cache key granularity when delegating to dynamic_m_tensor_signature.Source: Coding guidelines
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@python/cudnn/grouped_gemm/grouped_gemm_dsrelu/api.py`:
- Around line 1483-1493: Add a short docstring or inline comment to
dynamic_sfd_col_tensor_signature explaining the dimension-selection rationale:
state that static_shape intentionally omits dimension 4 (rest_m) because rest_m
varies per-column and should not be part of the cache key, and that
dynamic_stride_dims=(2, 5) marks the stride-related dimensions (the inner M
chunk and the leading stride for packed layout) as dynamic because their strides
can vary even when logical sizes match; also mention how this choice maps to the
SFD column tensor layout and why it yields the desired cache key granularity
when delegating to dynamic_m_tensor_signature.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 941018c2-14e8-4ce1-a369-5b4cb4767865
📒 Files selected for processing (1)
python/cudnn/grouped_gemm/grouped_gemm_dsrelu/api.py
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 by CodeRabbit