运行 IPU 模型上的 Tensorflow 程序抛出 "Illegal instruction (core dumped)" 错误
Running a Tensorflow program on an IPU Model throws an "Illegal instruction (core dumped)" error
我正在尝试 运行 来自 Graphcore public 示例 (MNIST). I’m using the IPU model instead of IPU hardware because my machine doesn’t have access to IPU hardware, so I’ve followed the documentation (Running on the IPU Model simulator) 的 TensorFlow2 示例,并将以下内容添加到我的模型中:
# 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 wheel 是为 Skylake class CPUs 编译的,具有可用的 AVX-512 指令集,因此不符合要求的处理器(即 Skylake class CPU具有 AVX-512 功能)将无法 运行 Graphcore Tensorflow 代码。 (您可以在 SDK 概述文档的“要求”部分查看要求 here)。
要查看您的处理器是否具有 AVX-512 功能,运行 cat /proc/cpuinfo
并查看任何处理器的 flags
字段 - 它们应该都具有相同的标志。如果您没有看到 avx512f
,则说明您的处理器不符合 运行ning Tensorflow 代码的 Graphcore 要求。下面是 cat
命令 returns 在符合要求的机器上的一个例子(结果 t运行 cated to one processor):
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 或其合作伙伴提供的机器将始终满足这些要求,因此最好使用它们。他们还将拥有足够的内核和内存,例如,情况可能并非如此。个人笔记本电脑。
我正在尝试 运行 来自 Graphcore public 示例 (MNIST). I’m using the IPU model instead of IPU hardware because my machine doesn’t have access to IPU hardware, so I’ve followed the documentation (Running on the IPU Model simulator) 的 TensorFlow2 示例,并将以下内容添加到我的模型中:
# 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 wheel 是为 Skylake class CPUs 编译的,具有可用的 AVX-512 指令集,因此不符合要求的处理器(即 Skylake class CPU具有 AVX-512 功能)将无法 运行 Graphcore Tensorflow 代码。 (您可以在 SDK 概述文档的“要求”部分查看要求 here)。
要查看您的处理器是否具有 AVX-512 功能,运行 cat /proc/cpuinfo
并查看任何处理器的 flags
字段 - 它们应该都具有相同的标志。如果您没有看到 avx512f
,则说明您的处理器不符合 运行ning Tensorflow 代码的 Graphcore 要求。下面是 cat
命令 returns 在符合要求的机器上的一个例子(结果 t运行 cated to one processor):
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 或其合作伙伴提供的机器将始终满足这些要求,因此最好使用它们。他们还将拥有足够的内核和内存,例如,情况可能并非如此。个人笔记本电脑。