Comments (13)
Debug code for setup.py
print(self.compiler.compiler_so)
if platform.system() == 'unix':
new_flags = {"-march": "native", "-mtune": "native",
"-Wextra": None, "-std": "c11"}
Contents of compiler_so:
['gcc', '-pthread', '-B', '/opt/conda/compiler_compat', '-Wno-unused-result', '-Wsign-compare', '-DNDEBUG', '-O2', '-Wall', '-fPIC', '-O2', '-n1', '.2-a+fp16+rcpc+dotprod+crypto', '-isystem', '/opt/conda/include', '-I/opt/conda/include', '-fPIC', '-O2', '-n1', '.2-a+fp16+rcpc+dotprod+crypto', '-isystem', '/opt/conda/include', '-fPIC']
from xprec.
Something seems to go horribly wrong here with self.compiler.compiler_so
before we even touch that variable:
The option string does not make any sense at all ... why would we pass -n
to gcc, and then the linker, thereby disabling linking to shared libraries, when we are building a shared library? But even if it did, -n
does not take any argument, so what is that 1
doing there? Plus what is that: .2-a+fp16+rcpc+dotprod+crypto
? We do not even load anything crypto-related ...
So this compiler invocation reads completely nonsensical to me ... can you build anything else with this?
from xprec.
I have a hunch: Can you check if anaconda passing -march=neoverse-n1.2-a+fp16+rcpc+dotprod+crypto
or similar stuff into setuptools? You can check build flags etc. in python -m sysconfig
...
from xprec.
Yes, after removing -n1 .2-a+fp16+rcpc+dotprod+crypto
, gcc stops complaining.
These flags may come from the compilation flags used to build python.
> python3 -m sysconfig|grep crypto
CFLAGS = "-Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -n1 .2-a+fp16+rcpc+dotprod+crypto -isystem /opt/conda/include -I/opt/conda/include -fPIC -O2 -n1 .2-a+fp16+rcpc+dotprod+crypto -isystem /opt/conda/include " CONFIGURE_CFLAGS = " -fPIC -O2 -n1 .2-a+fp16+rcpc+dotprod+crypto -isystem /opt/conda/include -I/opt/conda/include"
CONFIG_ARGS = "'--prefix=/opt/conda' '--build=aarch64-conda_cos7-linux-gnu' '--host=aarch64-conda_cos7-linux-gnu''--enable-ipv6' '--with-ensurepip=no' '--with-tzpath=/opt/conda/share/zoneinfo:/opt/conda/share/tzinfo' '--with-computed-gotos''--with-system-ffi' '--enable-loadable-sqlite-extensions' '--with-tcltk-includes=-I/opt/conda/include' '--with-tcltk-libs=-L/opt/conda/lib -ltcl8.6 -ltk8.6''--with-platlibdir=lib' '--with-openssl=/opt/conda' 'PKG_CONFIG_LIBDIR=/opt/conda/lib' 'PKG_CONFIG_PATH=/opt/conda/lib' 'CPPFLAGS=-DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /opt/conda/include -I/opt/conda/include -I/opt/conda/include' 'CXXFLAGS=-fvisibility-inlines-hidden -std=c++17 -fmessage-length=0 -fPIC -O2 -n1 .2-a+fp16+rcpc+dotprod+crypto -isystem /opt/conda/include -I/opt/conda/include' 'CFLAGS= -fPIC -O2 -n1 .2-a+fp16+rcpc+dotprod+crypto -isystem /opt/conda/include -I/opt/conda/include' 'LDFLAGS= -Wl,-rpath,/opt/conda/lib -Wl,-rpath-link,/opt/conda/lib -L/opt/conda/lib -L/opt/conda/lib' 'CC= gcc' 'CXX=g++''--with-lto' '--enable-optimizations' '-oldincludedir=/usr/include' '--disable-shared''PROFILE_TASK=-m test --pgo' 'build_alias=aarch64-conda_cos7-linux-gnu' 'host_alias=aarch64-conda_cos7-linux-gnu''MACHDEP=linux' 'CPP=/home/ec2-user/miniconda3/envs/prefect/conda-bld/python-split_1631809412910/_build_env/bin/cpp'"
OPENSSL_LIBS = "-lssl -lcrypto"
PY_BUILTIN_MODULE_CFLAGS = "-Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -n1 .2-a+fp16+rcpc+dotprod+crypto -isystem /opt/conda/include -I/opt/conda/include -fPIC -O2 -n1 .2-a+fp16+rcpc+dotprod+crypto -isystem /opt/conda/include -g -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Werror=implicit-function-declaration -fvisibility=hidden -I/home/ec2-user/miniconda3/envs/prefect/conda-bld/python-split_1631809412910/work/Include/internal -IObjects -IInclude -IPython -I. -I/home/ec2-user/miniconda3/envs/prefect/conda-bld/python-split_1631809412910/work/Include -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /opt/conda/include -I/opt/conda/include -I/opt/conda/include -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /opt/conda/include -I/opt/conda/include -DPy_BUILD_CORE_BUILTIN"
PY_CFLAGS = "-Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -n1 .2-a+fp16+rcpc+dotprod+crypto -isystem /opt/conda/include -I/opt/conda/include -fPIC -O2 -n1 .2-a+fp16+rcpc+dotprod+crypto -isystem /opt/conda/include "
PY_CORE_CFLAGS = "-Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -n1 .2-a+fp16+rcpc+dotprod+crypto -isystem /opt/conda/include -I/opt/conda/include -fPIC -O2 -n1 .2-a+fp16+rcpc+dotprod+crypto -isystem /opt/conda/include -g -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Werror=implicit-function-declaration -fvisibility=hidden -I/home/ec2-user/miniconda3/envs/prefect/conda-bld/python-split_1631809412910/work/Include/internal -IObjects -IInclude -IPython -I. -I/home/ec2-user/miniconda3/envs/prefect/conda-bld/python-split_1631809412910/work/Include -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /opt/conda/include -I/opt/conda/include -I/opt/conda/include -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /opt/conda/include -I/opt/conda/include -DPy_BUILD_CORE"
PY_STDMODULE_CFLAGS = "-Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -n1 .2-a+fp16+rcpc+dotprod+crypto -isystem /opt/conda/include -I/opt/conda/include -fPIC -O2 -n1 .2-a+fp16+rcpc+dotprod+crypto -isystem /opt/conda/include -g -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Werror=implicit-function-declaration -fvisibility=hidden -I/home/ec2-user/miniconda3/envs/prefect/conda-bld/python-split_1631809412910/work/Include/internal -IObjects -IInclude -IPython -I. -I/home/ec2-user/miniconda3/envs/prefect/conda-bld/python-split_1631809412910/work/Include -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /opt/conda/include -I/opt/conda/include -I/opt/conda/include -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /opt/conda/include -I/opt/conda/include"
Full output:
sysconfig.txt
from xprec.
Not much we can do here ... if python reports to having been built with flags that it could not have been built since the compiler does not understand it, the config is simply broken. Possible workaround is to remove such flags, but I don't know how general this is...
from xprec.
A general
way may be to distribute precompiled binary packages....
from xprec.
We can try, though it does have one downside: performance in double-double arithmetic relies heavily on a fast FMA instruction, which is not universally available. If we build binary packages, can we fine-tune it or do we have to take a performance hit?
from xprec.
Do you mean FMA3? Reasonably new x86 processors support FMA3, I think.
https://en.wikipedia.org/wiki/FMA_instruction_set
I do not know ARM64.
FYI:
https://github.com/marketplace/actions/build-and-publish-conda-packages-to-anaconda-org
from xprec.
Please have a go at this if you want ...
I have to say I hate setuptools so much that I don't want to touch it unless absolutely necessary :-D
from xprec.
I completely agree.
Anaconda has its own compilers bundled.
https://docs.conda.io/projects/conda-build/en/latest/resources/compiler-tools.html
from xprec.
Do you know any other libraries that have numpy C extensions and are available on conda?
from xprec.
The flags may be related to Graviton2, arm CPUs from Amazon.
from xprec.
Closed via #4
from xprec.
Related Issues (9)
- Some missing ufuncs and differences from numpy type behavior HOT 7
- dd license clarification HOT 17
- Python 3.10 compatibility HOT 5
- Python 3.11 compatibility HOT 3
- Wrong results and failling test HOT 8
- Fail to build with numpy 2.0 HOT 1
- xprec packages are broken HOT 1
- Using ddouble as a constructor HOT 8
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 xprec.