Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pick up vector length from 'zvlXXXb' (RVV) mattr for riscv #17641

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

cbalint13
Copy link
Contributor

@cbalint13 cbalint13 commented Feb 11, 2025

This PR is an enhancement for #17631.


New functionality:

  • This also parses optional 'zvlXXXb' attribute from -mattr arguments, if user would supply such.

Enhanchements:

  • Separate GetVectorWidth() @LLVMTargetInfo a shared public function, reachable from python side too.
  • A basic codegen testcase for riscv{32,64} targets is introduced, for now it checks RVV presence/absence.
  • A target parser testcase for riscv{32,64} is also introduced, it checks sanity and VLEN relations.

This not alter any behavior except riscv targets.
This work here is a preliminary before enable TVM's SVE for riscv too.

@cbalint13 cbalint13 force-pushed the riscv-vectorwidth branch 6 times, most recently from 4a1912a to 2b186e9 Compare February 11, 2025 13:44
name="C",
)
s = te.create_schedule(C.op)
s[C].vectorize(s[C].op.axis[0])
Copy link
Member

Choose a reason for hiding this comment

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

we are moving away from te schedule very soon, so let us instead use tir schedule

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Reworked, it is even more simple now, I was expecting relay to go, not realizing the same about te.

@cbalint13 cbalint13 force-pushed the riscv-vectorwidth branch 6 times, most recently from 8a49899 to 146157d Compare February 12, 2025 01:57
@cbalint13 cbalint13 marked this pull request as ready for review February 12, 2025 02:03
@cbalint13
Copy link
Contributor Author

This is ready for review.
Cc (LLVM folks) @quic-sanirudh , @srkreddy1238

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.

2 participants