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

[AIE2] Add missing intrinsics. #210

Merged
merged 1 commit into from
Oct 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 54 additions & 3 deletions clang/lib/Headers/aiev2_aie_api_compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -713,6 +713,16 @@ inline __attribute__((always_inline)) v8cacc64 addmac_elem_8_2_conf(v16cint16 ,
inline __attribute__((always_inline)) v8cacc64 addmsc_elem_8_2_conf(v16cint16 , int , v16cint16 , int , v8cacc64 , v8cacc64 , int , int , int , int , int , int );
inline __attribute__((always_inline)) v8cacc64 submac_elem_8_2_conf(v16cint16 , int , v16cint16 , int , v8cacc64 , v8cacc64 , int , int , int , int , int );
inline __attribute__((always_inline)) v8cacc64 submsc_elem_8_2_conf(v16cint16 , int , v16cint16 , int , v8cacc64 , v8cacc64 , int , int , int , int , int );
inline __attribute__((always_inline)) v8caccfloat mul_elem_8_2_conf(v16bfloat16 , v16cbfloat16 , int , int );
inline __attribute__((always_inline)) v8caccfloat negmul_elem_8_2_conf(v16bfloat16 , v16cbfloat16 , int , int );
inline __attribute__((always_inline)) v8caccfloat mac_elem_8_2_conf(v16cbfloat16 , v16cbfloat16 , v8caccfloat , int , int , int , int , int );
inline __attribute__((always_inline)) v8caccfloat negmac_elem_8_2_conf(v16cbfloat16 , v16cbfloat16 , v8caccfloat , int , int , int , int , int );
inline __attribute__((always_inline)) v8caccfloat msc_elem_8_2_conf(v16cbfloat16 , v16cbfloat16 , v8caccfloat , int , int , int , int , int );
inline __attribute__((always_inline)) v8caccfloat negmsc_elem_8_2_conf(v16cbfloat16 , v16cbfloat16 , v8caccfloat , int , int , int , int , int );
inline __attribute__((always_inline)) v8caccfloat addmac_elem_8_2_conf(v16cbfloat16 , v16cbfloat16 , v8caccfloat , v8caccfloat , int , int , int , int , int , int );
inline __attribute__((always_inline)) v8caccfloat addmsc_elem_8_2_conf(v16cbfloat16 , v16cbfloat16 , v8caccfloat , v8caccfloat , int , int , int , int , int , int );
inline __attribute__((always_inline)) v8caccfloat submac_elem_8_2_conf(v16cbfloat16 , v16cbfloat16 , v8caccfloat , v8caccfloat , int , int , int , int , int , int );
inline __attribute__((always_inline)) v8caccfloat submsc_elem_8_2_conf(v16cbfloat16 , v16cbfloat16 , v8caccfloat , v8caccfloat , int , int , int , int , int , int );
inline __attribute__((always_inline)) v8cacc64 mul_elem_8_2_cc(v16cint16 , v16cint16 );
inline __attribute__((always_inline)) v8cacc64 negmul_elem_8_2_cc(v16cint16 , v16cint16 );
inline __attribute__((always_inline)) v8cacc64 mac_elem_8_2_cc(v16cint16 , v16cint16 , v8cacc64 );
Expand Down Expand Up @@ -803,6 +813,42 @@ inline __attribute__((always_inline)) v8cacc64 addmac_elem_8_nc(v8cint32 , v16ci
inline __attribute__((always_inline)) v8cacc64 addmsc_elem_8_nc(v8cint32 , v16cint16 , v8cacc64 , v8cacc64 );
inline __attribute__((always_inline)) v8cacc64 submac_elem_8_nc(v8cint32 , v16cint16 , v8cacc64 , v8cacc64 );
inline __attribute__((always_inline)) v8cacc64 submsc_elem_8_nc(v8cint32 , v16cint16 , v8cacc64 , v8cacc64 );
inline __attribute__((always_inline)) v4caccfloat mul_2x8_8x2(v16bfloat16 , v16cbfloat16 );
inline __attribute__((always_inline)) v4caccfloat negmul_2x8_8x2(v16bfloat16 , v16cbfloat16 );
inline __attribute__((always_inline)) v4caccfloat mac_2x8_8x2(v16bfloat16 , v16cbfloat16 , v4caccfloat );
inline __attribute__((always_inline)) v4caccfloat msc_2x8_8x2(v16bfloat16 , v16cbfloat16 , v4caccfloat );
inline __attribute__((always_inline)) v4caccfloat addmac_2x8_8x2(v16bfloat16 , v16cbfloat16 , v4caccfloat , v4caccfloat );
inline __attribute__((always_inline)) v4caccfloat addmsc_2x8_8x2(v16bfloat16 , v16cbfloat16 , v4caccfloat , v4caccfloat );
inline __attribute__((always_inline)) v4caccfloat mul_2x8_8x2(v16cbfloat16 , v16bfloat16 );
inline __attribute__((always_inline)) v4caccfloat negmul_2x8_8x2(v16cbfloat16 , v16bfloat16 );
inline __attribute__((always_inline)) v4caccfloat mac_2x8_8x2(v16cbfloat16 , v16bfloat16 , v4caccfloat );
inline __attribute__((always_inline)) v4caccfloat msc_2x8_8x2(v16cbfloat16 , v16bfloat16 , v4caccfloat );
inline __attribute__((always_inline)) v4caccfloat addmac_2x8_8x2(v16cbfloat16 , v16bfloat16 , v4caccfloat , v4caccfloat );
inline __attribute__((always_inline)) v4caccfloat addmsc_2x8_8x2(v16cbfloat16 , v16bfloat16 , v4caccfloat , v4caccfloat );
inline __attribute__((always_inline)) v4caccfloat mul_2x8_8x2(v16cbfloat16 , v16cbfloat16 );
inline __attribute__((always_inline)) v4caccfloat negmul_2x8_8x2(v16cbfloat16 , v16cbfloat16 );
inline __attribute__((always_inline)) v4caccfloat mac_2x8_8x2(v16cbfloat16 , v16cbfloat16 , v4caccfloat );
inline __attribute__((always_inline)) v4caccfloat msc_2x8_8x2(v16cbfloat16 , v16cbfloat16 , v4caccfloat );
inline __attribute__((always_inline)) v4caccfloat addmac_2x8_8x2(v16cbfloat16 , v16cbfloat16 , v4caccfloat , v4caccfloat );
inline __attribute__((always_inline)) v4caccfloat addmsc_2x8_8x2(v16cbfloat16 , v16cbfloat16 , v4caccfloat , v4caccfloat );
inline __attribute__((always_inline)) v4caccfloat mul_2x8_8x2_conf(v16bfloat16 , v16cbfloat16 , int );
inline __attribute__((always_inline)) v4caccfloat negmul_2x8_8x2_conf(v16bfloat16 , v16cbfloat16 , int );
inline __attribute__((always_inline)) v4caccfloat mul_2x8_8x2_conf(v16cbfloat16 , v16bfloat16 , int );
inline __attribute__((always_inline)) v4caccfloat negmul_2x8_8x2_conf(v16cbfloat16 , v16bfloat16 , int );
inline __attribute__((always_inline)) v4caccfloat mul_2x8_8x2_conf(v16cbfloat16 , v16cbfloat16 , int );
inline __attribute__((always_inline)) v4caccfloat negmul_2x8_8x2_conf(v16cbfloat16 , v16cbfloat16 , int );
inline __attribute__((always_inline)) v4caccfloat mac_2x8_8x2_conf(v16bfloat16 , v16cbfloat16 , v4caccfloat , int , int , int );
inline __attribute__((always_inline)) v4caccfloat msc_2x8_8x2_conf(v16bfloat16 , v16cbfloat16 , v4caccfloat , int , int , int );
inline __attribute__((always_inline)) v4caccfloat addmac_2x8_8x2_conf(v16bfloat16 , v16cbfloat16 , v4caccfloat , v4caccfloat , int , int , int , int );
inline __attribute__((always_inline)) v4caccfloat addmsc_2x8_8x2_conf(v16bfloat16 , v16cbfloat16 , v4caccfloat , v4caccfloat , int , int , int , int );
inline __attribute__((always_inline)) v4caccfloat mac_2x8_8x2_conf(v16cbfloat16 , v16bfloat16 , v4caccfloat , int , int , int );
inline __attribute__((always_inline)) v4caccfloat msc_2x8_8x2_conf(v16cbfloat16 , v16bfloat16 , v4caccfloat , int , int , int );
inline __attribute__((always_inline)) v4caccfloat addmac_2x8_8x2_conf(v16cbfloat16 , v16bfloat16 , v4caccfloat , v4caccfloat , int , int , int , int );
inline __attribute__((always_inline)) v4caccfloat addmsc_2x8_8x2_conf(v16cbfloat16 , v16bfloat16 , v4caccfloat , v4caccfloat , int , int , int , int );
inline __attribute__((always_inline)) v4caccfloat mac_2x8_8x2_conf(v16cbfloat16 , v16cbfloat16 , v4caccfloat , int , int , int );
inline __attribute__((always_inline)) v4caccfloat msc_2x8_8x2_conf(v16cbfloat16 , v16cbfloat16 , v4caccfloat , int , int , int );
inline __attribute__((always_inline)) v4caccfloat addmac_2x8_8x2_conf(v16cbfloat16 , v16cbfloat16 , v4caccfloat , v4caccfloat , int , int , int , int );
inline __attribute__((always_inline)) v4caccfloat addmsc_2x8_8x2_conf(v16cbfloat16 , v16cbfloat16 , v4caccfloat , v4caccfloat , int , int , int , int );
inline __attribute__((always_inline)) v8caccfloat mul_elem_8_2(v16cbfloat16 , v16cbfloat16 );
inline __attribute__((always_inline)) v8caccfloat negmul_elem_8_2(v16cbfloat16 , v16cbfloat16 );
inline __attribute__((always_inline)) v8caccfloat mac_elem_8_2(v16cbfloat16 , v16cbfloat16 , v8caccfloat );
Expand All @@ -824,11 +870,11 @@ inline __attribute__((always_inline)) v8caccfloat addmsc_elem_8_2(v16cbfloat16 ,
inline __attribute__((always_inline)) v8caccfloat mul_elem_8_2_conf(v16cbfloat16 , v16cbfloat16 , int );
inline __attribute__((always_inline)) v8caccfloat negmul_elem_8_2_conf(v16cbfloat16 , v16cbfloat16 , int );
inline __attribute__((always_inline)) v8caccfloat mac_elem_8_2_conf(v16cbfloat16 , v16cbfloat16 , v8caccfloat , int , int , int );
inline __attribute__((always_inline)) v8caccfloat mac_elem_8_2_conf(v16cbfloat16, v16cbfloat16, v8caccfloat, int, int, int, int, int);
inline __attribute__((always_inline)) v8caccfloat msc_elem_8_2_conf(v16cbfloat16 , v16cbfloat16 , v8caccfloat , int , int , int );
inline __attribute__((always_inline)) v8caccfloat msc_elem_8_2_conf(v16cbfloat16, v16cbfloat16, v8caccfloat, int, int, int, int, int);
inline __attribute__((always_inline)) v8caccfloat addmac_elem_8_2_conf(v16cbfloat16 , v16cbfloat16 , v8caccfloat , v8caccfloat , int , int , int , int );
inline __attribute__((always_inline)) v8caccfloat submac_elem_8_2_conf(v16cbfloat16 , v16cbfloat16 , v8caccfloat , v8caccfloat , int , int , int , int );
inline __attribute__((always_inline)) v8caccfloat addmsc_elem_8_2_conf(v16cbfloat16 , v16cbfloat16 , v8caccfloat , v8caccfloat , int , int , int , int );
inline __attribute__((always_inline)) v8caccfloat submsc_elem_8_2_conf(v16cbfloat16 , v16cbfloat16 , v8caccfloat , v8caccfloat , int , int , int , int );
inline __attribute__((always_inline)) v8caccfloat mul_elem_8_2_conf(v16cbfloat16 , v16bfloat16 , int );
inline __attribute__((always_inline)) v8caccfloat negmul_elem_8_2_conf(v16cbfloat16 , v16bfloat16 , int );
inline __attribute__((always_inline)) v8caccfloat mac_elem_8_2_conf(v16cbfloat16 , v16bfloat16 , v8caccfloat , int , int , int );
Expand Down Expand Up @@ -946,7 +992,6 @@ inline __attribute__((always_inline)) v4caccfloat mul_2x8_8x2(v16float , v16cflo
inline __attribute__((always_inline)) v4caccfloat mul_2x8_8x2_accuracy_safe(v16float , v16cfloat );
inline __attribute__((always_inline)) v4caccfloat mul_2x8_8x2_accuracy_fast(v16float , v16cfloat );
inline __attribute__((always_inline)) v4caccfloat mul_2x8_8x2_accuracy_low(v16float , v16cfloat );
inline __attribute__((always_inline)) v4caccfloat mul_2x8_8x2(v16bfloat16 , v16cbfloat16 );
inline __attribute__((always_inline)) v8cacc64 mul_elem_8(v8cint32 , v8cint32 );
inline __attribute__((always_inline)) v8cacc64 negmul_elem_8(v8cint32 , v8cint32 );
inline __attribute__((always_inline)) v8cacc64 mac_elem_8(v8cint32 , v8cint32 , v8cacc64 );
Expand Down Expand Up @@ -1398,6 +1443,10 @@ inline __attribute__((always_inline)) v16cbfloat16 sel(v16cbfloat16 , v16cbfloat
inline __attribute__((always_inline)) unsigned int le(v16float , v16float );
inline __attribute__((always_inline)) unsigned int eq(v16float , v16float );
inline __attribute__((always_inline)) unsigned int ne(v16float , v16float );
inline __attribute__((always_inline)) void * add_2d_int(void * , int , int , addr_t , addr_t , addr_t & );
inline __attribute__((always_inline)) void * add_2d_byte_int(void * , int , int , addr_t , addr_t , addr_t & );
inline __attribute__((always_inline)) void * add_3d_int(void * , int , int , int , addr_t , addr_t , addr_t & , addr_t , addr_t , addr_t & );
inline __attribute__((always_inline)) void * add_3d_byte_int(void * , int , int , int , addr_t , addr_t , addr_t & , addr_t , addr_t , addr_t & );
Copy link
Collaborator

Choose a reason for hiding this comment

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

Curious: What do we define addr_t to, and does our calling convention support it?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

addr_t is typedef'd to int32_t.

inline __attribute__((always_inline)) void * byte_incr(void * , int );
inline __attribute__((always_inline)) int delay1(int );
inline __attribute__((always_inline)) int delay2(int );
Expand Down Expand Up @@ -1461,6 +1510,8 @@ inline __attribute__((always_inline)) v16accfloat mac_4x8_8x4_conf(v32float , v3
inline __attribute__((always_inline)) v16accfloat msc_4x8_8x4_conf(v32float , v32float , v16accfloat , int , int , int );
inline __attribute__((always_inline)) v16accfloat addmac_4x8_8x4_conf(v32float , v32float , v16accfloat , v16accfloat , int , int , int , int );
inline __attribute__((always_inline)) v16accfloat addmsc_4x8_8x4_conf(v32float , v32float , v16accfloat , v16accfloat , int , int , int , int );
inline __attribute__((always_inline)) v8caccfloat mul_elem_8_2_conf(v16cbfloat16 , v16cbfloat16 , int , int );
inline __attribute__((always_inline)) v8caccfloat negmul_elem_8_2_conf(v16cbfloat16 , v16cbfloat16 , int , int );
// clang-format on

#endif // __AIEV2_AIE_API_COMPAT_H
Loading