Skip to content

Conversation

@LoserCheems
Copy link
Collaborator

Replaces generic copy struct with AutoVectorizingCopyWithAssumedAlignment for better memory access patterns.

Reduces vector layout from 8 to 4 values per read for ZOH and ActiveMask operations to optimize memory bandwidth usage.

Replaces generic copy struct with AutoVectorizingCopyWithAssumedAlignment for better memory access patterns.

Reduces vector layout from 8 to 4 values per read for ZOH and ActiveMask operations to optimize memory bandwidth usage.
Copy link
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 copy operations to leverage improved vectorization for better memory access patterns. Key changes include:

  • Replacing Gmem_copy_struct with AutoVectorizingCopyWithAssumedAlignment for ZOH and ActiveMask copy operations
  • Reducing the vector layout from 8 to 4 values per read for ZOH and ActiveMask operations to optimize memory bandwidth usage
Comments suppressed due to low confidence (2)

csrc/src/kernel_traits.h:157

  • Consider adding a brief inline comment or documentation note explaining why AutoVectorizingCopyWithAssumedAlignment with a 64-byte alignment is used for ZOH and ActiveMask, especially given that a different alignment (128) is used for the 'O' operation.
        make_tiled_copy(Copy_Atom<AutoVectorizingCopyWithAssumedAlignment<64>, Element>{},

csrc/src/kernel_traits.h:159

  • Ensure that tests cover the new vector layout configuration to confirm that reducing from 8 to 4 values per read does not introduce unintended behavior.
                        Layout<Shape<_1, _4>>{}));      // Val layout, 4 vals per read

@LoserCheems LoserCheems merged commit ce9873c into main Jun 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants