Skip to content

Updated vadv2 files#422

Open
Suhana-TT wants to merge 1 commit into
tenstorrent:mainfrom
Suhana-TT:vadv2-work
Open

Updated vadv2 files#422
Suhana-TT wants to merge 1 commit into
tenstorrent:mainfrom
Suhana-TT:vadv2-work

Conversation

@Suhana-TT
Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings April 27, 2026 12:09
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the VADV2 TTNN workload codepaths and tests, primarily refactoring around tensor slicing/indexing and reducing torch interop in several attention/transformer components.

Changes:

  • Replaced several tensor slicing/indexing patterns with shape-based tensor construction.
  • Updated VADV2 attention/encoder components to allocate intermediate tensors directly as TTNN tensors (and adjusted compare-threshold handling in tt_head).
  • Updated PCC tests’ debug logging formatting and modified the backbone test’s device initialization.

Reviewed changes

Copilot reviewed 11 out of 12 changed files in this pull request and generated 13 comments.

Show a summary per file
File Description
workloads/ttnn/vadv2/tt/tt_utils.py Refactors deformable attention sampling grid construction (now shape-based).
workloads/ttnn/vadv2/tt/tt_transformer.py Refactors object/map query embedding splitting logic (now shape-based).
workloads/ttnn/vadv2/tt/tt_temporal_self_attention.py Refactors slice/shape handling for value concatenation and spatial shape normalization.
workloads/ttnn/vadv2/tt/tt_spatial_cross_attention.py Refactors bev_mask per-camera handling and allocates rebatch tensors as TTNN.
workloads/ttnn/vadv2/tt/tt_mha.py Refactors Q/K/V projection splitting from combined weights/biases (now shape-based).
workloads/ttnn/vadv2/tt/tt_head.py Wraps scalar thresholds for ttnn.compare and changes pad tensor construction.
workloads/ttnn/vadv2/tt/tt_encoder.py Refactors lidar2img construction and multiple slice-based computations (now shape-based).
workloads/ttnn/vadv2/tt/tt_deformable_attention.py Refactors spatial shape column extraction (now shape-based).
workloads/ttnn/vadv2/tests/pcc/test_tt_head.py Fixes logger debug output formatting using f-strings.
workloads/ttnn/vadv2/tests/pcc/test_tt_backbone.py Changes test signature and opens a device inside the test.
workloads/DiffusionDrive/navsim/agents/diffusiondrive/reference/Transfuser_backbone/comparison_results.md Updates recorded comparison results content and timestamp.
.gitignore Removes the *.npy ignore entry.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread workloads/ttnn/vadv2/tt/tt_encoder.py Outdated
Comment thread workloads/ttnn/vadv2/tt/tt_spatial_cross_attention.py Outdated
Comment thread workloads/ttnn/vadv2/tt/tt_deformable_attention.py Outdated
Comment thread workloads/ttnn/vadv2/tests/pcc/test_tt_backbone.py Outdated
Comment thread workloads/ttnn/vadv2/tt/tt_transformer.py Outdated
Comment thread workloads/ttnn/vadv2/tt/tt_temporal_self_attention.py Outdated
Comment thread workloads/ttnn/vadv2/tt/tt_mha.py Outdated
Comment thread workloads/ttnn/vadv2/tt/tt_head.py Outdated
Comment thread workloads/ttnn/vadv2/tt/tt_encoder.py Outdated
Comment thread workloads/ttnn/vadv2/tt/tt_encoder.py Outdated
Comment thread workloads/ttnn/vadv2/tests/pcc/test_tt_head.py
Comment thread workloads/ttnn/vadv2/tt/tt_temporal_self_attention.py Outdated
Comment thread workloads/ttnn/vadv2/tt/tt_spatial_cross_attention.py Outdated
Comment thread workloads/ttnn/vadv2/tt/tt_encoder.py Outdated
Copilot AI review requested due to automatic review settings April 28, 2026 09:10
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 14 out of 14 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread workloads/ttnn/vadv2/tt/tt_transformer.py Outdated
Comment thread workloads/ttnn/vadv2/tt/tt_deformable_attention.py Outdated
Comment thread workloads/ttnn/vadv2/tt/tt_spatial_cross_attention.py Outdated
Comment thread workloads/ttnn/vadv2/tt/tt_encoder.py Outdated
Comment thread workloads/ttnn/vadv2/tt/tt_encoder.py Outdated
Copilot AI review requested due to automatic review settings April 28, 2026 13:22
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 14 out of 14 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread workloads/ttnn/vadv2/tt/tt_spatial_cross_attention.py Outdated
Comment thread workloads/ttnn/vadv2/tt/tt_head.py Outdated
Copilot AI review requested due to automatic review settings May 8, 2026 06:35
@Suhana-TT Suhana-TT closed this May 8, 2026
@Suhana-TT Suhana-TT reopened this May 8, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 14 out of 14 changed files in this pull request and generated 12 comments.

Comment thread workloads/ttnn/vadv2/tt/tt_transformer.py Outdated
Comment thread workloads/ttnn/vadv2/tt/tt_transformer.py Outdated
Comment thread workloads/ttnn/vadv2/tt/tt_mha.py Outdated
Comment thread workloads/ttnn/vadv2/tt/tt_utils.py Outdated
Comment thread workloads/ttnn/vadv2/tt/tt_temporal_self_attention.py Outdated
Comment thread workloads/ttnn/vadv2/tt/tt_encoder.py Outdated
Comment thread workloads/ttnn/vadv2/tt/tt_deformable_attention.py
Comment thread workloads/ttnn/vadv2/tt/tt_head.py Outdated
Comment thread workloads/ttnn/vadv2/tests/pcc/test_tt_backbone.py Outdated
Comment thread workloads/ttnn/vadv2/tt/tt_utils.py Outdated
Copilot AI review requested due to automatic review settings May 11, 2026 13:08
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 13 comments.

Comment thread workloads/ttnn/vadv2/tt/tt_encoder.py Outdated
Comment thread workloads/ttnn/vadv2/tt/tt_encoder.py Outdated
Comment thread ttsim/ops/desc/tensor.py Outdated
Comment thread ttsim/ops/desc/tensor.py
Comment thread ttsim/ops/desc/tensor.py Outdated
Comment thread workloads/ttnn/vadv2/tt/tt_temporal_self_attention.py
Comment thread workloads/ttnn/vadv2/tt/tt_head.py Outdated
Comment thread workloads/ttnn/vadv2/tt/tt_head.py Outdated
Comment thread workloads/ttnn/vadv2/tt/tt_head.py
Comment thread workloads/ttnn/vadv2/tt/tt_head.py Outdated
@Suhana-TT Suhana-TT closed this May 11, 2026
@Suhana-TT Suhana-TT reopened this May 11, 2026
Copilot AI review requested due to automatic review settings May 11, 2026 16:46
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 7 comments.

Comment thread workloads/ttnn/vadv2/tt/tt_head.py Outdated
Comment thread workloads/ttnn/vadv2/tt/tt_head.py Outdated
Comment thread ttsim/ops/desc/tensor.py Outdated
Comment thread ttsim/ops/desc/tensor.py Outdated
Comment thread ttsim/ops/desc/tensor.py Outdated
Comment thread ttsim/ops/desc/data_compute.py Outdated
Comment thread ttsim/front/ttnn/op.py Outdated
Copilot AI review requested due to automatic review settings May 11, 2026 18:52
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 9 comments.

Comment thread workloads/ttnn/vadv2/tt/tt_transformer.py
Comment thread workloads/ttnn/vadv2/tt/tt_temporal_self_attention.py
Comment thread workloads/ttnn/vadv2/tt/tt_head.py Outdated
Comment thread ttsim/ops/desc/tensor.py Outdated
Comment thread ttsim/ops/desc/tensor.py
Comment thread ttsim/ops/desc/tensor.py Outdated
Comment thread ttsim/ops/desc/tensor.py Outdated
Comment thread ttsim/ops/desc/data_compute.py Outdated
Comment thread ttsim/front/ttnn/op.py Outdated
Comment thread workloads/ttnn/vadv2/tt/tt_deformable_attention.py
Comment thread workloads/ttnn/vadv2/tt/tt_encoder.py
Comment thread workloads/ttnn/vadv2/tt/tt_temporal_self_attention.py
Comment thread ttsim/front/ttnn/op.py Outdated
Comment thread ttsim/ops/desc/data_compute.py Outdated
Comment thread ttsim/ops/desc/tensor.py Outdated
Copy link
Copy Markdown
Contributor

@ramamalladiTT ramamalladiTT left a comment

Choose a reason for hiding this comment

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

please limit changes to workloads directory. go ahead with the change in workloads/ttnn/vadv2/tt/tt_deformable_attention.py for s0 and s1. resolve the comments. I would we approve post these changes.

Copilot AI review requested due to automatic review settings May 12, 2026 17:32
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Comment on lines +217 to +222

divisor = ttnn.maximum(ref_slice, ones_like * eps_tensor)
divisor = ttnn.Tensor(shape=divisor.shape, dtype=ttnn.bfloat16, device=self.device, layout=ttnn.Layout.TILE_LAYOUT, data=divisor.data)
# DEBUG: Check types before the failing line


Comment on lines +137 to +140
num_levels = spatial_shapes.shape[0] # This is 1
slice_shape = (num_levels,) # Shape should be [1] for each column
# slice_sp_s0 = spatial_shapes[..., 0].shape
# slice_sp_s1 = spatial_shapes[..., 1].shape
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