gpt4 book ai didi

tensorflow - 在 IPU 模型上运行 TensorFlow 程序会引发 "Illegal instruction (core dumped)"错误

转载 作者:行者123 更新时间:2023-12-03 21:49:15 25 4
gpt4 key购买 nike

我正在尝试从 Graphcore 公共(public)示例 (MNIST) 中运行 TensorFlow2 示例。我使用的是 IPU 模型而不是 IPU 硬件,因为我的机器无法访问 IPU 硬件,所以我按照文档 (Running on the IPU Model simulator) 并将以下内容添加到我的模型中:

# Using IPU model instead of IPU hardware 

if self.base_dictionary['ipu_model']:

os.environ['TF_POPLAR_FLAGS'] = '--use_ipu_model'
当我运行模型时,它失败了: Illegal instruction (core dumped) .当我使用现有示例时,我看不出这是从哪里来的。这是什么错误,我该如何解决?

最佳答案

Illegal instruction意味着您的程序正在生成您的 CPU 无法处理的指令。 Graphcore TensorFlow 轮是为具有可用 AVX-512 指令集的 Skylake 类 CPU 编译的,因此不符合要求的处理器(即具有 AVX-512 功能的 Skylake 类 CPU)将无法运行 Graphcore Tensorflow 代码。 (您可以在 SDK 概述文档 here 的“要求”部分查看要求)。
要查看您的处理器是否具有 AVX-512 功能,请运行 cat /proc/cpuinfo看看flags任何处理器的字段 - 它们都应该具有相同的标志。如果您没有看到 avx512f ,您的处理器不符合运行 Tensorflow 代码的 Graphcore 要求。这是 cat 的示例命令在符合要求的机器上返回(结果被截断为一个处理器):

processor       : 95 

vendor_id : GenuineIntel

cpu family : 6

model : 85

model name : Intel(R) Xeon(R) Platinum 8168 CPU @ 2.70GHz

stepping : 4

microcode : 0x2000064

cpu MHz : 1200.703

cache size : 33792 KB

physical id : 1

siblings : 48

core id : 27

cpu cores : 24

apicid : 119

initial apicid : 119

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 pti intel_ppin ssbd mba ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm 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 md_clear flush_l1d

bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs taa itlb_multihit

bogomips : 5401.49

clflush size : 64

cache_alignment : 64

address sizes : 46 bits physical, 48 bits virtual

power management:

Graphcore 或其合作伙伴提供的机器将始终满足这些要求,因此最好使用它们。他们还将有足够的内核和内存,例如,情况可能并非如此。个人笔记本电脑。

关于tensorflow - 在 IPU 模型上运行 TensorFlow 程序会引发 "Illegal instruction (core dumped)"错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63356571/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com