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

Fix RVV inline header generation #487

Open
blapie opened this issue Nov 22, 2023 · 3 comments
Open

Fix RVV inline header generation #487

blapie opened this issue Nov 22, 2023 · 3 comments

Comments

@blapie
Copy link
Collaborator

blapie commented Nov 22, 2023

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?

@luhenry
Copy link
Contributor

luhenry commented Nov 22, 2023

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 master...rivosinc:sleef:fix-rvv-inline-headers

blapie added a commit to blapie/sleef that referenced this issue Feb 8, 2024
Macs do not implement SVE yet and Darwin does not support it.
Should solve shibatch#425 and shibatch#487.
@blapie
Copy link
Collaborator Author

blapie commented Jun 7, 2024

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

@luhenry
Copy link
Contributor

luhenry commented Jun 11, 2024

Yes, it's all working now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants