Skip to content

[Feature]: Optimize vectorization utils for csrc/quantization/vectorization_utils.cuh #20327

@yewentao256

Description

@yewentao256

🚀 The feature, motivation and pitch

Currently, the vectorize_with_alignment could handle arbitrary elements, but this could also cause some overhead.
To further improve the performance, we can add some branches to it, so eg

  // Fast path identical to the one added for the write version above.
  bool can_vec = ((addr & (WIDTH - 1)) == 0) && ((len & (VEC_SIZE - 1)) == 0);
  if (can_vec) {
    vec_op
  }

  // arbitrary num of elements supported logic now
  ...

I will have a pr for this soon

Alternatives

No response

Additional context

No response

Before submitting a new issue...

  • Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the documentation page, which can answer lots of frequently asked questions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions