当前位置:网站首页>Maximize tensorflow* CPU performance (shell)
Maximize tensorflow* CPU performance (shell)
2022-06-12 20:13:00 【chen_ :)】
Detailed usage : Maximize TensorFlow* CPU performance
original text :Maximize TensorFlow* Performance on CPU: Considerations and Recommendations for Inference Workloads
export TF_ENABLE_ONEDNN_OPTS=1
intra_op_parallelism = number of physical core per socket
# Number of physical cores per slot
inter_op_parallelism = number of sockets
get the number of physical core per socket and number of sockets on your platform
#!/bin/bash
total_cpu_cores=$(nproc)
number_sockets=$(($(grep "^physical id" /proc/cpuinfo | awk '{print $4}' | sort -un | tail -1)+1))
number_cpu_cores=$(( (total_cpu_cores/2) / number_sockets))
echo "number of CPU cores per socket: $number_cpu_cores";
echo "number of socket: $number_sockets";
data_format = NHWC
export TF_ENABLE_MKL_NATIVE_FORMAT=1 (or 0)
numactl --cpunodebind=0 --membind=0 python
numactl --cpunodebind=N --membind=N python
numactl --cpunodebind=0 --membind=0 python & numactl --cpunodebind=1 --membind=1 python
export OMP_NUM_THREADS=num physical cores
export KMP_AFFINITY=granularity=fine,compact,1,0
export KMP_BLOCKTIME=0 (or 1)
边栏推荐
- 2022年,中国大学生最多的20个城市
- JDBC interface summary
- Efcore tuning
- Viewpoint sharing | Li Wei, an expert of Gewu titanium intelligent technology products: underlying logic and scenario practice of unstructured data platform
- Halcon angle and radian interchange
- Ctfshow-web266 (deserialization)
- Simple understanding of anti shake function
- Centos7 installing PHP
- Unsupported class file major version 60
- The Milvus graphical management tool Attu is coming!
猜你喜欢
![[generation confrontation network learning III] reading notes of Bigan paper and its principle understanding](/img/6b/0f0815e20cdf6da28793562bcaede1.png)
[generation confrontation network learning III] reading notes of Bigan paper and its principle understanding

Experience Technology Department of ant group launched the 2023rd school recruitment

Reading small programs based on wechat e-book graduation design works (7) Interim inspection report

What is a federated index?

Reading small program graduation design based on wechat e-book (5) assignment

Unsupported class file major version 60

Axure RP 9 for Mac(交互式产品原型设计工具)中文版

Axure RP 9 for MAC (interactive product prototyping tool) Chinese version

1. Getting to know R

Using / developing private plug-ins in traifik proxy 2.5 (traifik official blog)
随机推荐
【GAMES101】课堂笔记8–着色(着色频率、图形管线、纹理映射)
EFCore调优
MySQL log
WordPress optimization tutorial makes WordPress open faster
Demand and business model innovation-5-process
Demand and business model analysis-3-design
What is a hash index?
2022年最新宁夏建筑安全员模拟题库及答案
JDBC接口总结
Microsoft Word 教程,如何在 Word 中插入页码、目录?
Using / developing private plug-ins in traifik proxy 2.5 (traifik official blog)
QT knowledge: QT widgets widget class [01]
A simple understanding of consistent hash
牛客網:三數之和
MySQL index classification
Go memory escape analysis
Analysis of test questions in Chapter 13 of PMP preparation
synchronized下的 i+=2 和 i++ i++执行结果居然不一样
Demand and business model analysis-1-business model canvas
Microsoft Word tutorial, how to insert page numbers and table of contents in word?