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

Need to be able to control the level of SIMD through cmake options #9

Closed
yurivict opened this issue Oct 8, 2020 · 4 comments
Closed
Labels
enhancement New feature or request wontfix This will not be worked on

Comments

@yurivict
Copy link

yurivict commented Oct 8, 2020

When the package is built it should be built for the lowest common SIMD level supported everywhere, even though the build server might support a higher level. Individual users might want to build individually for their own hardware.

The project should have configuration options to choose the level of SIMD.

Ideally, there should be boolean options:

  • SIMD_NONE
  • SIMD_NATIVE
  • SIMD_SSE2
  • SIMD_SSE41
  • SIMD_SSE42
    etc, etc.

Otherwise the package built on a server with high SIMD level would crash on an older CPU with lower SIMD support.

@1480c1
Copy link

1480c1 commented Oct 8, 2020

I think it would also be good to have a dispatcher so that a higher simd level does not get called on systems without it, so it would be okay to copy a binary between two different machines

@adamjw24
Copy link
Member

adamjw24 commented Oct 8, 2020

The decoder detects the highest available SIMD extension it can use during runtime. So differences between build and runtime machines should not be a problem.

Did you have a specific problem with that? Could you specify more detail about the exact used build/runtime computers?

For testing purposes, it is still possible to restrict SIMD in the code by setting cVVDecParameter.m_eSIMD_Extension in vvdecapp.cpp (there is not cmd parameter because this is not your everyday usecase).

@adamjw24 adamjw24 added the enhancement New feature or request label Oct 8, 2020
@yurivict
Copy link
Author

yurivict commented Oct 8, 2020

  1. Here https://github.com/fraunhoferhhi/vvdec/blob/master/source/Lib/vvdec/CMakeLists.txt#L72 SSE-4.1/SSE-4.2 are enabled which aren't generally available.

  2. Build on powerpc64 failed because of unconditional SSE options. Normally SIMD options should be used only on architectures where they are supported, and generic code should be used elsewhere.

@adamjw24
Copy link
Member

adamjw24 commented Oct 8, 2020

As it says in the README.md, VVdeC is a x86 VVC decoder. So if you are compiling on a powerpc64, you should use a cross-compiler with x86 target architecture, in which case the compiler should support the options.

But I guess, since the codebase actually supports it, we might adapt the build process appropriately. This will never be non-experimental and properly tested, though, and low-priority for now.

@adamjw24 adamjw24 added the wontfix This will not be worked on label Mar 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

3 participants