TomHeaven / tensorflow-osx-build

Off-the-shelf python package of tensorflow with CUDA support for Mac OS.
142 stars 20 forks source link

Host, Default Version Fatal Python error: Illegal instruction:4 #17

Closed DeniJsonC closed 4 years ago

DeniJsonC commented 4 years ago

不论是跑tensorflow benchmark 还是任何要调用gpu的网络 都会报这个错误 没找到解决办法 pciBusID: 0000:01:00.0 name: GeForce GTX 1050 Ti computeCapability: 6.1 coreClock: 1.493GHz coreCount: 6 deviceMemorySize: 4.00GiB deviceMemoryBandwidth: 104.43GiB/s 2020-05-22 17:13:55.493405: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.10.0.dylib 2020-05-22 17:13:55.493584: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.10.0.dylib 2020-05-22 17:13:55.493753: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.10.0.dylib 2020-05-22 17:13:55.493922: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.10.0.dylib 2020-05-22 17:13:55.494088: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.10.0.dylib 2020-05-22 17:13:55.494255: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.10.0.dylib 2020-05-22 17:13:55.494421: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.7.dylib 2020-05-22 17:13:55.494557: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:942] OS X does not support NUMA - returning NUMA node zero 2020-05-22 17:13:55.494804: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:942] OS X does not support NUMA - returning NUMA node zero 2020-05-22 17:13:55.494920: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1703] Adding visible gpu devices: 0 2020-05-22 17:13:57.428660: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1102] Device interconnect StreamExecutor with strength 1 edge matrix: 2020-05-22 17:13:57.428684: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1108] 0 2020-05-22 17:13:57.428688: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1121] 0: N 2020-05-22 17:13:57.429476: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:942] OS X does not support NUMA - returning NUMA node zero 2020-05-22 17:13:57.429794: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:942] OS X does not support NUMA - returning NUMA node zero 2020-05-22 17:13:57.430043: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:942] OS X does not support NUMA - returning NUMA node zero 2020-05-22 17:13:57.430631: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1247] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 1784 MB memory) -> physical GPU (device: 0, name: GeForce GTX 1050 Ti, pci bus id: 0000:01:00.0, compute capability: 6.1) 2020-05-22 17:13:57.442090: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x7f91ad5345a0 initialized for platform CUDA (this does not guarantee that XLA will be used). Devices: 2020-05-22 17:13:57.442120: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): GeForce GTX 1050 Ti, Compute Capability 6.1 2020-05-22 17:13:57.481004: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x7f91ad58c820 initialized for platform Host (this does not guarantee that XLA will be used). Devices: 2020-05-22 17:13:57.481025: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version Fatal Python error: Illegal instruction

10.13.6 1050ti+i7 4771

TomHeaven commented 4 years ago

请尝试v1.15或者v2.0。 v2.1, v2.2在比较新的CPU上编译,指令不兼容老CPU。

DeniJsonC commented 4 years ago

请尝试v1.15或者v2.0。 v2.1, v2.2在比较新的CPU上编译,指令不兼容老CPU。

那是不是 可以照你的2.0教程 自己编译2.2 只需要把2.0替换成2.2?

TomHeaven commented 4 years ago

是的。根据教程,改用对应版本的source patch就行了。

TomHeaven commented 4 years ago

我提供了一个新的v2.2.0,兼容Intel Hashwell CPU,可以试试:https://github.com/TomHeaven/tensorflow-osx-build/releases/tag/v2.0.0_cu100_cudnn76

DeniJsonC commented 4 years ago

感谢