Skip to content

Add common VectorType alias - #762

Merged
coderfeli merged 3 commits into
mainfrom
pr/vec-alias
Jun 29, 2026
Merged

Add common VectorType alias#762
coderfeli merged 3 commits into
mainfrom
pr/vec-alias

Conversation

@sjfeng1999

Copy link
Copy Markdown
Collaborator

Motivation

Technical Details

Test Plan

Test Result

Submission Checklist

Copilot AI 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.

Pull request overview

This PR introduces a set of common fixed-lane Vector alias types (e.g., Float32x4) in flydsl.expr.typing, along with a small utility descriptor to lazily compute per-class attributes (used to compute MLIR ir_type within an active ir.Context).

Changes:

  • Added lazy_classattr descriptor in flydsl.expr.utils for non-cached, context-dependent class attributes.
  • Added VectorAlias(...) factory and many concrete vector alias classes (e.g., Float32x4, Int8x16) plus __all__ exports.
  • Added unit tests validating alias behavior and export via flydsl.expr.

Reviewed changes

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

File Description
tests/unit/test_vector.py Adds unit tests for new vector alias types and package-level exports.
python/flydsl/expr/utils/__init__.py Adds lazy_classattr descriptor used by alias types to compute ir_type lazily per access.
python/flydsl/expr/typing.py Implements VectorAlias and many concrete *xN vector alias classes; updates vector behavior and exports.

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

Comment thread python/flydsl/expr/typing.py Outdated
Comment thread python/flydsl/expr/typing.py
@coderfeli
coderfeli merged commit 93579ae into main Jun 29, 2026
17 of 21 checks passed
@coderfeli
coderfeli deleted the pr/vec-alias branch June 29, 2026 11:46
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