-
Notifications
You must be signed in to change notification settings - Fork 92
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
Define BFloat16 intrinsics #293
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are using __bf16
for the scalar type, can we add a reference to some specification about this name?
Other than that, everything else LGTM.
Shouldn't |
|
68f125b
to
c33f99f
Compare
Extracted reference as a separate adoc file. Signed-off-by: eop Chen <eop.chen@sifive.com>
Define (non-segment/segment) load/store intrinsics for bfloat16 values and also psuedo utility functions for manipulation across types. Signed-off-by: eop Chen <eop.chen@sifive.com>
Signed-off-by: eop Chen <eop.chen@sifive.com>
…it-commit-autogen-bf16-doc)
…ommit-autogen-bf16-test)
vfncvtbf16.f.f.w vd, vs2, vm vfwcvtbf16.f.f.v vd, vs2, vm
…it-commit-autogen-bf16-doc)
…ommit-autogen-bf16-test)
vfwmaccbf16.vv vd, vs1, vs2, vm vfwmaccbf16.vf vd, rs1, vs2, vm
…it-commit-autogen-bf16-doc)
…ommit-autogen-bf16-test)
…types Signed-off-by: eop Chen <eop.chen@sifive.com>
Signed-off-by: eop Chen <eop.chen@sifive.com>
Signed-off-by: eop Chen <eop.chen@sifive.com>
…it-commit-autogen-bf16-doc)
…ommit-autogen-bf16-test)
Rebase and addressed comments from @dzaima, thank you for pointing this out. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks @eopXD !
It follows the interface defined here: riscv-non-isa/rvv-intrinsic-doc#293
I'll take over and proceed this patch! |
It follows the interface defined here: riscv-non-isa/rvv-intrinsic-doc#293
@@ -0,0 +1,67 @@ | |||
== References |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most of this file does not look bf16 specific. Only the last line is bf16. How did the references work before?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh this was separated out of rvv-intrinsic-spec.adoc. I just hadn't gotten there yet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
NOTE: This PR currently is based upon #292
NOTE: These new intrinsics introduced are not part of the to-be-frozen v1.0 intrinsics specification. These new intrinsics will not be cherry-picked to the v1.0.x branch.
This pull request defines intrinsics for vector bfloat16 type manipulations and vector instructions that are introduced by the RISC-V BFloat16 instruction set extensions (
zvfbfmin
andzvfbfwma
) [0].Intrinsics introduced for vector bfloat16 type manipulation:
vcreate
,vundefined
, ... etc (you may find the exact list under generated prototypes and its declarations underbfloat16_inst.py
)New intrinsics are added to expose new instructions introduced:
vfwmaccbf16.vv vd, vs1, vs2, vm
vfwmaccbf16.vf vd, rs1, vs2, vm
vfncvtbf16.f.f.w vd, vs2, vm
vfwcvtbf16.f.f.v vd, vs2, vm
[0] https://github.com/riscv/riscv-bfloat16