当前位置:网站首页>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)
边栏推荐
- Interpreter Files
- Negative remainder problem
- Continuously improve the overall performance of adaoracle Oracle Oracle
- 华尔街备忘单(Wall Street Cheat Sheet)
- Demand and business model innovation - demand 4- overview of demand acquisition
- Unsupported class file major version 60
- Generate API documents using swagger (go language example)
- 【GAMES101】课堂笔记8–着色(着色频率、图形管线、纹理映射)
- 牛客網:三數之和
- The difference between MySQL full table scanning and indexing
猜你喜欢

Introduction to system mode development of rouya wechat mall

How to make a computer installation and startup USB flash disk

Detailed explanation of search tree and hash table

开源深度学习框架PlaidML安装及测试

1. Getting to know R

Negative remainder problem

How mysterious is "PIP not an internal or external command, nor a runnable program or batch file"

WordPress optimization tutorial makes WordPress open faster

Niuke net: somme des trois nombres

进程的创建fork()、消亡wait()
随机推荐
Demand and business model innovation - demand 2- demand basis
const
The joint empowerment plan of Baidu PaddlePaddle large enterprise open innovation center was launched! Help Pudong to upgrade its industry intelligently
Understand Jack Dorsey's web5 from the ppt on page 16
Is foreign exchange speculation formal and is the fund safe?
system()
【生成对抗网络学习 其三】BiGAN论文阅读笔记及其原理理解
1. Getting to know R
Viewpoint sharing | Li Wei, an expert of Gewu titanium intelligent technology products: underlying logic and scenario practice of unstructured data platform
The Milvus graphical management tool Attu is coming!
Unsupported class file major version 60
Wechat applet notes
How to make a computer installation and startup USB flash disk
SPI one master and many slaves
QT知识:Qt Widgets小部件类【01】
How to close icloud when Apple ID of Apple mobile phone forgets password and frequently jumps out to log in
Stm8l51 sx1280 commissioning record
Index optimization principle
When will the index fail
华尔街备忘单(Wall Street Cheat Sheet)