Comments (7)
Did I file this in the wrong place? cpuinfo is included in the third_party deps of pytorch and this repo is within the pytorch org. I had assumed you all talk occasionally?
The only option I see available in pytorch is -DUSE_SYSTEM_PYTORCH
to use a version provided by the system rather than bundled in the third party repo.
And the cmake warning when building on unsupported architectures:
CMake Warning at third_party/cpuinfo/CMakeLists.txt:81 (MESSAGE):
Target processor architecture "s390x" is not supported in cpuinfo. cpuinfo
will compile, but cpuinfo_initialize() will always fail.
from cpuinfo.
To you question, "Why is syscall undeclared on Red Hat?", I don't think this is distribution specific. As mentioned I don't have this problem on amd64 or aarch64 using the same version of clang. Rather it seems a difference in architectures.
One of the explanations I see is:
"#define _GNU_SOURCE before including unistd.h or any other header as syscall(2) is not POSIX."
https://stackoverflow.com/questions/42469583/problems-calling-syscall-function-in-c
It's also present in the example within the man page
https://man7.org/linux/man-pages/man2/syscall.2.html#EXAMPLES
Putting this define at the top of the file does seem to resolve the build failure. I don't have a strong enough understanding at present to say why it's necessary for some architectures and not others.
from cpuinfo.
Why is syscall
undeclared on Red Hat?
from cpuinfo.
Also, cpuinfo doesn't support ppc64 and s390x
from cpuinfo.
Is there a way to build pytorch without it?
from cpuinfo.
I don't know, you should ask PyTorch devs
from cpuinfo.
@Maratyszcza syscall is not a standard function in posix.
It is implemented in glibc. It looks like the Clang has strict constraints (compared to GCC) ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
.
The man page https://linux.die.net/man/2/syscall also show that we should add #define _GNU_SOURCE
before including headers.
from cpuinfo.
Related Issues (20)
- Please support FreeBSD HOT 1
- soc name unknow for huawei mate40
- hwcap on aarch64 linux is 64bit
- exynos9810 problem HOT 2
- Parse cpu a76 core as a55 result in serious performance problem HOT 5
- Add Bazel builds to PR hooks
- CPUINFO_SUPPORTED_PLATFORM not set on OSX as CMAKE_SYSTEM_PROCESSOR is not set HOT 1
- Add a Github workflow to build Android RISC-V, when an NDK is available
- Nothing Phone 1 support HOT 1
- How to obtain information of CPU frequency? HOT 2
- [Feature Request] Add amx detection in cpuinfo HOT 7
- Unknown chip name for Nokia 8.3 5G HOT 1
- Crash Seen with unspecified micro arch for Windows On Arm devices when getting the cpu micro arch info to check the core type
- Ampere(R) Altra(R) Processor - CPU Detection Error
- Incorrect cache-info output with nosmt linux kernel command line HOT 2
- missing `libcpuinfo.pc` from distro package install HOT 1
- `get_cpu_info()` hangs forever
- Why do we need 'get_system_info_from_registry' for ARM64 device?
- FreeBSD: Xeon CPUs are not detected properly HOT 15
- Add avx10 detect
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 cpuinfo.