sleef icon indicating copy to clipboard operation
sleef copied to clipboard

Fix RVV inline header generation

Open blapie opened this issue 1 year ago • 3 comments

Just noticed I missed something while reviewing the RVV port. In order to make the inline header file work you need to add an extra line after (almost) each macro so it can be processed correctly.

See the examples in this patch: https://github.com/shibatch/sleef/pull/283/files#diff-ef9773efa1e59a8749e0e62f58bbe5971cce560eeebbc5918601099cb11a5457

Then hopefully you can switch the tests back on in the workflow file.

@luhenry Would you mind having a look at this?

blapie avatar Nov 22 '23 09:11 blapie

It's not going to be that trivial as there are conflicting types between SP and DP modes. For example, the following:


#ifdef ENABLE_RVV_SP
// Types that conflict with ENABLE_RVV_DP
#if defined(ENABLE_RVVM1) || defined(ENABLE_RVVM1NOFMA)
typedef vuint64m2_t vmask;
typedef vbool32_t vopmask;
#elif defined(ENABLE_RVVM2) || defined(ENABLE_RVVM2NOFMA)
typedef vuint64m4_t vmask;
typedef vbool16_t vopmask;
#else
#error "unknown rvv lmul"
#endif
#endif

#ifdef ENABLE_RVV_DP
// Types that conflict with ENABLE_RVV_SP
#if defined(ENABLE_RVVM1) || defined(ENABLE_RVVM1NOFMA)
typedef vuint64m1_t vmask;
typedef vbool64_t vopmask;
#elif defined(ENABLE_RVVM2) || defined(ENABLE_RVVM2NOFMA)
typedef vuint64m2_t vmask;
typedef vbool32_t vopmask;
#else
#error "unknown rvv lmul"
#endif
#endif

I don't really understand how to fix that up. Please find my WIP at https://github.com/shibatch/sleef/compare/master...rivosinc:sleef:fix-rvv-inline-headers

luhenry avatar Nov 22 '23 15:11 luhenry

@luhenry Can we close this one? I think we are way past that now?

blapie avatar Jun 07 '24 15:06 blapie

Yes, it's all working now

luhenry avatar Jun 11 '24 07:06 luhenry