Comments (5)
from ntl.
I know that it would be annoying to implement, but for the sake of argument, a perfect solution for us would be to have build flags that allow the user to override the detection of each CPU feature. The correct flag values could then be determined by looking at the CPUID, as in https://github.com/projg2/cpuid2cpuflags/, and specified by the user -- relieving NTL of the responsibility to detect them.
So, for example, a new flag:
FMA=on|off|auto (default: auto)
If I don't specify it, the default (auto) would continue to work as it does now. But if I know that my CPU has FMA support and if NTL can't detect it (due to missing CXXFLAGS=-march or some other reason), then I could pass FMA=on to DoConfig.
I think that would work in most cases, but some refactoring would be required in any tests that check not only for the CPU feature, but also some additional stuff. Here I have AVX2 in mind, which checks not only for AVX2 support in the CPU, but also the size of int/long and the FP precision.
from ntl.
from ntl.
You're right. I thought there were fallbacks for the builtins but it's not for all of them. My CPUs are too old to test most but e.g. PCLMUL does fail without the right compiler flags.
I'll close this now since the description is misleading. But in light of that, my one remaining suggestion would be to have NTL_ENABLE_AVX_FFT=on
ignored when the corresponding CPU features are unavailable. Right now, the build fails if NTL_ENABLE_AVX_FFT=on
but NTL doesn't like the CPU, making it hard for us to determine if it's safe to turn such a feature on.
Thanks for clarifying.
from ntl.
from ntl.
Related Issues (17)
- Precompute FFT to speed up multiplications by same polynomial HOT 1
- Flawed on Windows - Please repair
- [PATCH] Typos
- GMP version mismatch HOT 2
- WinNTL-11_5_1: Support for MINGW / static GMP library
- Sensitive Data on the Heap HOT 1
- Compilation error ZZ.h HOT 1
- build/install issue HOT 1
- About computation in ring. HOT 4
- issue HOT 2
- broken link to GF2X
- Where is the source code for this interface
- Arithmetic in integer sub-rings of cyclotomic number fields
- ZZ: need long long conv, maybe HOT 1
- Linking issue when using non system GMP HOT 5
- cross-compile HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ntl.