Updated vadv2 files#422
Conversation
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
ramamalladiTT
left a comment
There was a problem hiding this comment.
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.
|
|
||
| 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 | ||
|
|
||
|
|
| 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 |
No description provided.