New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tensorflow v2.2.0 build failure at the final step on macOS 10.13.6 with CUDA enabled #39262
Comments
From the template it looks like you are installing TensorFlow (TF) prebuilt binaries:
1. Installing TensorFlow-GPU (TF) prebuilt binaries TF Version >= 1.13 requires CUDA 10.0 and TF Version < 1.13 (till TF 1.5) requires CUDA 9.0.
2. Installing TensorFlow (TF) CPU prebuilt binaries TensorFlow release binaries version 1.6 and higher are prebuilt with AVX instruction sets. Therefore on any CPU that does not have these instruction sets, either CPU or GPU version of TF will fail to load.
Please let us know if this helps. |
@TomHeaven |
Thanks for the reply. The issue seems the most similar to #35584, but the cause is different. I've figured it out. The problem is in class SnapshotReader {
public:
//The reader input buffer size is deliberately large because the input reader
//will throw an error if the compressed block length cannot fit in the input
//buffer.
static constexpr const int64 kSnappyReaderInputBufferSizeBytes =
1 << 30; // 1 GiB
// TODO(b/148804377): Set this in a smarter fashion.
static constexpr const int64 kSnappyReaderOutputBufferSizeBytes =
/ 32 << 20; // 32 MiB
... There are two variables The solution is quite simple. I just move those two variable declarations from namespace tensorflow {
namespace data {
namespace experimental {
// Tom Added to solve symbol not found error on macOS
static constexpr const int64 kSnappyReaderInputBufferSizeBytes =
1 << 30; // 1 GiB
// TODO(b/148804377): Set this in a smarter fashion.
static constexpr const int64 kSnappyReaderOutputBufferSizeBytes =
32 << 20; // 32 MiB and re-compile Tensorflow. I'll try to make a pull request to close this issue. |
I created a pull request #39297 to solve this issue and multiple other compilation errors on macOS with CUDA enabled. |
Thank you @TomHeaven I will be eagerly awaiting the result of this PR. |
Please confirm if we may move this issue to closed status as there is a pr to monitor it |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you. |
Closing as stale. Please reopen if you'd like to work on this further. |
I've been building wheel packages of Tensorflow with CUDA support for macOS for a while. Usually, TF will be built successfully with some patches on sources and bazel config files.
However, I met a troublesome issue building Tensorflow v2.2.0 at the final step: The compiler complained about Symbol not found: __ZN10tensorflow4data12experimental14SnapshotReader33kSnappyReaderInputBufferSizeBytesE when loading _pywrap_tensorflow_internal.so. The details are as follows:
System information
The text was updated successfully, but these errors were encountered: