Intel® Optimized AI Frameworks
Receive community support for questions related to PyTorch* and TensorFlow* frameworks.

intel-tensorflo-avx512 bus error

wanben
Novato
3.330 Vistas

I run these code and tensorflow with :

pip install intel-tensorflow==2.8.0

will show:

 

2022-04-06 06:56:10.744124: I tensorflow/core/platform/cpu_feature_guard.cc:151] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX2 AVX512F FMA
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2022-04-06 06:56:10.745245: I tensorflow/core/common_runtime/process_util.cc:146] Creating new thread pool with default inter op setting:
Bus error (core dumped)

 

How can I fix it?

CPU:XEON Gold 5220R 

import  tensorflow as tf
import os
os.environ["TF_ENABLE_ONEDNN_OPTS"] = "1"
os.environ["KMP_BLOCKTIME"] = "1"
os.environ["KMP_SETTINGS"] = "1"
os.environ["KMP_AFFINITY"]= "granularity=fine,verbose,compact,1,0"
os.environ["OMP_NUM_THREADS"]='24'
tf.config.threading.set_intra_op_parallelism_threads(24)
import time
since = time.time()
print(since)


mnist = tf.keras.datasets.mnist

(x_train, y_train), (x_test, y_test) = mnist.load_data()
x_train, x_test = x_train / 255.0, x_test / 255.0
model = tf.keras.models.Sequential([
tf.keras.layers.Flatten(input_shape=(28, 28)),
tf.keras.layers.Dense(128, activation='relu'),
tf.keras.layers.Dropout(0.2),
tf.keras.layers.Dense(10)
])
predictions = model(x_train[:1]).numpy()
loss_fn = tf.keras.losses.SparseCategoricalCrossentropy(from_logits=True)
model.compile(optimizer='adam',
loss=loss_fn,
metrics=['accuracy'])
model.fit(x_train, y_train, epochs=20)
model.evaluate(x_test, y_test, verbose=2)
probability_model = tf.keras.Sequential([
model,
tf.keras.layers.Softmax()
])

time_elapsed = time.time() - since
print('Training complete in {:.0f}m {:.0f}s'.format(time_elapsed // 60, time_elapsed % 60)) # 打印出来时间

 

CPU info:
vendor_id : GenuineIntel
cpu family : 6
model : 85
model name : Intel(R) Xeon(R) Gold 5220R CPU @ 2.20GHz
stepping : 7
microcode : 0x5003102
cpu MHz : 3027.416
cache size : 36608 KB
physical id : 0
siblings : 48
core id : 27
cpu cores : 24
apicid : 55
initial apicid : 55
fpu : yes
fpu_exception : yes
cpuid level : 22
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 cdp_l3 invpcid_single intel_ppin ssbd mba ibrs ibpb stibp ibrs_enhanced tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid cqm mpx rdt_a avx512f avx512dq rdseed adx smap clflushopt clwb intel_pt avx512cd avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local dtherm ida arat pln pts pku ospke avx512_vnni md_clear flush_l1d arch_capabilities
bugs : spectre_v1 spectre_v2 spec_store_bypass swapgs taa itlb_multihit
bogomips : 4400.00
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:

 

0 kudos
3 Respuestas
Gopika_Intel
Moderador
3.248 Vistas

Hi,

Thank you for posting in Intel Communities.

Q: This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX2 AVX512F FMA

To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.

A: This is not an error; it is just telling you that it can and will take advantage of your CPU to get that extra speed out.

 

Q: I tensorflow/core/common_runtime/process_util.cc:146] Creating new thread pool with default inter op setting:

Bus error (core dumped)

A: The issue was mainly with the memory space. Please free up space within the user home path.

 

We were unable to reproduce the issue from our end.

Details of our machine

Machine details: Cascade Lake

Operating system: Ubuntu 20.04

Base Toolkit version used: 2022.1.2 (https://www.intel.com/content/www/us/en/developer/tools/oneapi/base-toolkit-download.html?operatingsystem=linux&distributions=webdownload&options=online)

Python version available with that base toolkit:3.9

 

We are trying in Windows machine also. Will update you once we get the results.

 

Details needed

Could you please share with us the following details so that we investigate the issue from our end?

1. Operating system you are using

2. Python version you are using

 

Workaround

You could try installing Intel® Optimization for TensorFlow* from Intel® AI Analytics Toolkit from here:

 

Available for Linux*

TensorFlow* version: 2.6

https://www.intel.com/content/www/us/en/developer/tools/oneapi/ai-analytics-toolkit-download.html?operatingsystem=linux

 

Other installation options: https://www.intel.com/content/www/us/en/developer/articles/guide/optimization-for-tensorflow-installation-guide.html

Regards

Gopika

Gopika_Intel
Moderador
3.211 Vistas

Hi,

We have not heard from you. If your issue is resolved, can we discontinue monitoring this thread?

Regards

Gopika


Gopika_Intel
Moderador
3.192 Vistas

Hi,

We have not heard back from you. This thread will no longer be monitored by Intel. If you need further assistance, please post a new question.

Regards

Gopika


Responder