Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/pytorch/cpuinfo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAshkan Aliabadi <ashkan.aliabadi@gmail.com>2020-05-09 06:40:33 +0300
committerDavid Reiss <dreiss@fb.com>2020-05-11 19:57:00 +0300
commitc2092219e7c874783a00a62edb94ddc672f57ab3 (patch)
tree87c8ea93fb7e78de4243ae874fc0686c20ef26fc /README.md
parent2b14e445016dd46f7de821cdf3093e2823b9ab21 (diff)
Upstream cpuinfo updates in XNNPACK as of XNNPACK:d793f6c2ec145be3ddbffea951e6e5480f4646b8.
Diffstat (limited to 'README.md')
-rw-r--r--README.md5
1 files changed, 5 insertions, 0 deletions
diff --git a/README.md b/README.md
index ee5fb82..97e65cd 100644
--- a/README.md
+++ b/README.md
@@ -49,6 +49,7 @@ Detect if target is a 32-bit or 64-bit ARM system:
```
Check if the host CPU support ARM NEON
+
```c
cpuinfo_initialize();
if (cpuinfo_has_arm_neon()) {
@@ -57,6 +58,7 @@ if (cpuinfo_has_arm_neon()) {
```
Check if the host CPU supports x86 AVX
+
```c
cpuinfo_initialize();
if (cpuinfo_has_x86_avx()) {
@@ -65,6 +67,7 @@ if (cpuinfo_has_x86_avx()) {
```
Check if the thread runs on a Cortex-A53 core
+
```c
cpuinfo_initialize();
switch (cpuinfo_get_current_core()->uarch) {
@@ -78,12 +81,14 @@ switch (cpuinfo_get_current_core()->uarch) {
```
Get the size of level 1 data cache on the fastest core in the processor (e.g. big core in big.LITTLE ARM systems):
+
```c
cpuinfo_initialize();
const size_t l1_size = cpuinfo_get_processor(0)->cache.l1d->size;
```
Pin thread to cores sharing L2 cache with the current core (Linux or Android)
+
```c
cpuinfo_initialize();
cpu_set_t cpu_set;