Skip to content

remove deprecated qkv/kv_packed apis - #2696

Merged
sudhakarsingh27 merged 4 commits into
NVIDIA:mainfrom
sudhakarsingh27:remove_deprecated_apis
Feb 25, 2026
Merged

sudhakarsingh27 merged 4 commits into
NVIDIA:mainfrom
sudhakarsingh27:remove_deprecated_apis

Conversation

@sudhakarsingh27

@sudhakarsingh27 sudhakarsingh27 commented Feb 20, 2026 •

Copy link
Copy Markdown
Member

Description

Remove the depracated APIs - nvte_fused_attn_fwd_qkvpacked, nvte_fused_attn_bwd_qkvpacked, nvte_fused_attn_fwd_kvpacked and nvte_fused_attn_bwd_kvpacked.

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

greptile-apps Bot commented Feb 20, 2026 •

Copy link
Copy Markdown
Contributor

Greptile Summary

Removed 4 deprecated fused attention APIs: nvte_fused_attn_fwd_qkvpacked, nvte_fused_attn_bwd_qkvpacked, nvte_fused_attn_fwd_kvpacked, and nvte_fused_attn_bwd_kvpacked. These APIs were marked as deprecated and users should use nvte_fused_attn_fwd and nvte_fused_attn_bwd with separate Q, K, V tensors instead.

  • Removed implementations from fused_attn.cpp (~650 lines including helper functions)
  • Removed declarations and documentation from fused_attn.h (~285 lines)
  • Removed helper functions: make_tensor_view, calculate_qkv_stride, calculate_qkv_unpacked_shape, calculate_kv_stride, calculate_kv_unpacked_shape
  • No remaining references found in codebase - clean removal

Confidence Score: 5/5

  • This PR is safe to merge - it's a clean removal of deprecated APIs with no remaining references
  • The PR cleanly removes deprecated APIs that were already marked with [[deprecated]] attributes. Comprehensive search shows no remaining references to these functions in the codebase (Python bindings, tests, or other C++ code). The removal is straightforward and only affects the deprecated code paths.
  • No files require special attention

Important Files Changed

Filename Overview
transformer_engine/common/fused_attn/fused_attn.cpp Removed 4 deprecated packed QKV/KV attention APIs and their helper functions (~650 lines)
transformer_engine/common/include/transformer_engine/fused_attn.h Removed function declarations and documentation for 4 deprecated packed attention APIs (~285 lines)

Last reviewed commit: 0689244

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

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

@sudhakarsingh27

Copy link
Copy Markdown
Member Author

/te-ci pytorch L0

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

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

@sudhakarsingh27

Copy link
Copy Markdown
Member Author

/te-ci jax L0

@sudhakarsingh27

Copy link
Copy Markdown
Member Author

/te-ci L0

cyanguwa
cyanguwa previously approved these changes Feb 23, 2026

@ptrendx ptrendx left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We should not do this before changing the major version.

@ptrendx

ptrendx commented Feb 24, 2026

Copy link
Copy Markdown
Member

Why do we need to do this now?

@sudhakarsingh27

Copy link
Copy Markdown
Member Author

Why do we need to do this now?

@ptrendx, it's not a must but these APIs have been "deprecated" for too long so it was decided to remove these with the next release.

We should not do this before changing the major version.

So, can we only do this in the next TE 3.0 release?

@ptrendx

ptrendx commented Feb 24, 2026

Copy link
Copy Markdown
Member

For better or worse they are part of our public API - we should not remove them in the minor release if we don't have a good reason for that.

@sudhakarsingh27

sudhakarsingh27 commented Feb 24, 2026 •

Copy link
Copy Markdown
Member Author

Does it mean we have to keep supporting the deprecated APIs as well? If we don't, then it's basically non-working code and I'm not sure if we should keep it in there.

Signed-off-by: Sudhakar Singh <sudhakars@nvidia.com>
@ptrendx
ptrendx dismissed their stale review February 24, 2026 17:42

offline discussion

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

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

@sudhakarsingh27

Copy link
Copy Markdown
Member Author

/te-ci L0

@sudhakarsingh27
sudhakarsingh27 merged commit df0ef6e into NVIDIA:main Feb 25, 2026
8 of 11 checks passed
KshitijLakhani pushed a commit that referenced this pull request Feb 25, 2026
Signed-off-by: Sudhakar Singh <sudhakars@nvidia.com>
Oleg-Goncharov pushed a commit to Oleg-Goncharov/TransformerEngine that referenced this pull request Feb 27, 2026
Signed-off-by: Sudhakar Singh <sudhakars@nvidia.com>
Signed-off-by: Oleg Goncharov <ogoncharov@nvidia.com>
@ptrendx ptrendx mentioned this pull request Sep 29, 2026
8 of 13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants