-
Notifications
You must be signed in to change notification settings - Fork 11
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
Update yEnc module #114
Update yEnc module #114
Conversation
CRC32 now uses rapidyenc's functions instead of crcutil
Wow! That is based on RV1.0? How did you test? On a virtual RISC-V RV1 machine? If so, time for me to buy a newer RISC-V SBC; my current one support RV0.7.x |
Yes. GCC 14 might be able to compile it for 0.7.1, but I don't know if it works as I'm only really supporting 1.0. I don't have any hardware, so I tested it via qemu*. No clue what actual performance is like (and even if I had hardware, RVV is, let's just say, rather liberal in what hardware is allowed to do, which makes it a little tricky to predict performance in a general sense). * I've only tested the yEnc code itself, not sabctools The build failures seem to be failing at upgrading pip, which shouldn't be affected by this PR. Not sure what the correct fix is. |
Well ... because you made the RV1.0 code ... I ordered RV1.0 hardware: "Banana Pi BPI-F3 SpacemiT K1 8 Core RISC-V chip". To arrive at end of May. |
The code changes are beyond my understanding, but do I understand correctly that crcutil is never used anymore? Even not as a fallback? Only if specifically enabled by compiler flag? Then indeed we can just remove it fully. The crc32 exceeding 32bit, wasn't that for either the 32bit arm platforms or that exotic 32bit on 64bit platform that Linux supports? The unsupported arm flag was for an old Synology chip, but I think we dropped that one already because unrar doesn't support old arm anymore. Will have to check that. |
It's still enabled by default, but only used on x86 CPUs which don't support PCLMULQDQ (which are quite old at this stage). There, the crcutil code is slightly faster than the fallback CRC code I have (e.g. 1150.71 vs 1325.75 MB/s on a Xeon L3426).
That doesn't quite sound right, as they should have no issue with sticking to 32-bit. |
There is a bit of discussion around that in #80 (comment) looks like an extreme case since Python would let you pass huge values and I think crcutil wouldn't handle them as expected. I believe we resolved to just disregard >32 bits. Test failures are because macos-latest runner is an M1 (macos-14-arm64) then I think it tries to run x64 Python. |
Seems like such a small benefit that we could just drop crcutil? |
I think that was for the length as opposed to the CRC32 itself? I suppose it doesn't matter much, but perhaps the tests involving >32-bit CRC32s can be removed, as they're not really a valid scenario.
Ooh, that's interesting. I've never been able to test anything on ARM Mac, so that could be useful if Github supports it now.
I've left it enabled by default because it is technically faster and I don't really mind the size cost, but I support a build flag to disable it. |
I fixed the macOS runs on the main branch by simply not forcing the architecture, only for the 32bit Windows build. Thanks a lot for the update :) |
See last point from sabnzbd#114
This brings the yEnc code up to date with rapidyenc v1.1.1, and removes almost all sabctools' specific modifications (should allow easier updates in future).
Key changes
Possible future changes
UNSUPPORTED_PLATFORM_ARM
check is relevant any more, as the code itself checks for the header, but it's left in as it might need some testing (this is the only remaining sabctools specific modification to rapidyenc)