Skip to content

Comments

remove deprecated qkv/kv_packed apis#2696

Open
sudhakarsingh27 wants to merge 1 commit intoNVIDIA:mainfrom
sudhakarsingh27:remove_deprecated_apis
Open

remove deprecated qkv/kv_packed apis#2696
sudhakarsingh27 wants to merge 1 commit intoNVIDIA:mainfrom
sudhakarsingh27:remove_deprecated_apis

Conversation

@sudhakarsingh27
Copy link
Collaborator

Description

Please include a brief summary of the changes, relevant motivation and context.

Fixes # (issue)

Type of change

  • Documentation change (change only to the documentation, either a fix or a new content)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Infra/Build change
  • Code refactoring

Changes

Please list the changes introduced in this PR:

  • Change A
  • Change B

Checklist:

  • I have read and followed the contributing guidelines
  • The functionality is complete
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Signed-off-by: Sudhakar Singh <sudhakars@nvidia.com>
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 20, 2026

Greptile Summary

removed four deprecated fused attention APIs (nvte_fused_attn_fwd_qkvpacked, nvte_fused_attn_bwd_qkvpacked, nvte_fused_attn_fwd_kvpacked, nvte_fused_attn_bwd_kvpacked) and their associated helper functions

  • removed function declarations from header file (~290 lines)
  • removed function implementations from cpp file (~588 lines)
  • removed internal helper functions (make_tensor_view, calculate_qkv_stride, calculate_qkv_unpacked_shape, calculate_kv_stride, calculate_kv_unpacked_shape) that were only used by deprecated APIs (~68 lines)
  • no remaining references to these functions in the codebase
  • users should migrate to nvte_fused_attn_fwd and nvte_fused_attn_bwd with separate Q, K, V tensors

Confidence Score: 5/5

  • safe to merge - clean removal of deprecated code with no remaining references
  • all removed functions were properly deprecated, no remaining usage in codebase, helper functions only used by deprecated APIs, straightforward deletion
  • no files require special attention

Important Files Changed

Filename Overview
transformer_engine/common/include/transformer_engine/fused_attn.h removed deprecated function declarations for qkvpacked and kvpacked APIs (4 functions, ~290 lines)
transformer_engine/common/fused_attn/fused_attn.cpp removed deprecated function implementations and helper functions (~650 lines total)

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Deprecated APIs] --> B[nvte_fused_attn_fwd_qkvpacked]
    A --> C[nvte_fused_attn_bwd_qkvpacked]
    A --> D[nvte_fused_attn_fwd_kvpacked]
    A --> E[nvte_fused_attn_bwd_kvpacked]
    
    B --> F[Helper Functions]
    C --> F
    D --> F
    E --> F
    
    F --> G[make_tensor_view]
    F --> H[calculate_qkv_stride]
    F --> I[calculate_qkv_unpacked_shape]
    F --> J[calculate_kv_stride]
    F --> K[calculate_kv_unpacked_shape]
    
    L[Migration Path] --> M[nvte_fused_attn_fwd]
    L --> N[nvte_fused_attn_bwd]
    
    M --> O[Separate Q, K, V tensors]
    N --> O
    
    style A fill:#ff9999
    style F fill:#ff9999
    style L fill:#99ff99
    style O fill:#99ff99
Loading

Last reviewed commit: 849077c

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

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.

1 participant