-
Notifications
You must be signed in to change notification settings - Fork 13
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
[AIE2P] Support end to end bfp16 conversion C intrinsics #273
Conversation
f5734bb
to
4a8a48a
Compare
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.
Looks good!
e6b647e
to
a50c1ba
Compare
a50c1ba
to
be0030a
Compare
BuiltinID == AIE::BI__builtin_aie2p_v64accfloat_to_v64bfp16ebs16) | ||
Ops.push_back(EmitScalarExpr(E->getArg(E->getNumArgs() - 1))); | ||
if (BuiltinID == AIE::BI__builtin_aie2p_v64bfp16ebs8_to_v64bfp16ebs16) { | ||
Ops.push_back(EmitScalarExpr(E->getArg(E->getNumArgs() - 2))); |
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.
Nit: I think we can just use E->getArg(2)
and E->getArg(3)
here, similar to below
|
||
MachineInstrBuilder MI = MIB.buildInstr(OpCode, {DstReg}, {SrcReg}); | ||
|
||
auto MantCopyMI = MIB.buildInstr(TargetOpcode::COPY, {DstReg1}, {}) |
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.
nit: next time we write this COPY code, maybe introduce a helper function?
|
||
MachineInstrBuilder MI = MIB.buildInstr(OpCode, {DstReg}, {SrcReg}); | ||
|
||
auto MantCopyMI = MIB.buildInstr(TargetOpcode::COPY, {DstReg1}, {}) |
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.
same here, we could have a helper that creates the COPYs for mantissa and exponent
No description provided.