Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
Fix for AttributeError: 'CollectiveAllReduceExtended' object has no attribute '_cfer_fn_cache'
See https://github.com/tensorflow/tensorflow/issues/39417

Author: Alexander Grund
--- tensorflow-2.1.0-orig/tensorflow/python/distribute/collective_all_reduce_strategy.py 2020-05-11 18:14:03.682085572 +0200
+++ tensorflow-2.1.0/tensorflow/python/distribute/collective_all_reduce_strategy.py 2020-05-11 18:15:41.623409641 +0200
@@ -19,6 +19,7 @@
from __future__ import print_function

import copy
+import weakref

from tensorflow.core.protobuf import config_pb2
from tensorflow.core.protobuf import rewriter_config_pb2
@@ -172,6 +173,7 @@
cross_device_ops_lib.CollectiveCommunication)
self._communication = communication
self._initialize_strategy(cluster_resolver)
+ self._cfer_fn_cache = weakref.WeakKeyDictionary()
assert isinstance(self._get_cross_device_ops(),
cross_device_ops_lib.CollectiveAllReduce)

Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ exts_list = [
'patches': [
'TensorFlow-1.14.0_swig-env.patch',
'TensorFlow-2.1.0_fix-cuda-build.patch',
'TensorFlow-2.1.0_fix-collective-all-reduce-strategy.patch',
],
'source_tmpl': 'v%(version)s.tar.gz',
'source_urls': ['https://github.com/tensorflow/tensorflow/archive/'],
Expand All @@ -137,6 +138,8 @@ exts_list = [
'69cd836f87b8c53506c4f706f655d423270f5a563b76dc1cfa60fbc3184185a3', # v2.2.0.tar.gz
'b83cce6b91c7d19b8b320158ffc50fb4b2de454f5ac191c58d704234a1bf9005', # TensorFlow-1.14.0_swig-env.patch
'78c20aeaa7784b8ceb46238a81e8c2461137d28e0b576deeba8357d23fbe1f5a', # TensorFlow-2.1.0_fix-cuda-build.patch
# TensorFlow-2.1.0_fix-collective-all-reduce-strategy.patch
'093f4dd3ec372a82d50dffe32eea6821025cd1c406911a746c4367a40bc38486',
],
}),
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ exts_list = [
'patches': [
'TensorFlow-1.14.0_swig-env.patch',
'TensorFlow-2.1.0_fix-cuda-build.patch',
'TensorFlow-2.1.0_fix-collective-all-reduce-strategy.patch',
],
'source_tmpl': 'v%(version)s.tar.gz',
'source_urls': ['https://github.com/tensorflow/tensorflow/archive/'],
Expand All @@ -139,6 +140,8 @@ exts_list = [
'69cd836f87b8c53506c4f706f655d423270f5a563b76dc1cfa60fbc3184185a3', # v2.2.0.tar.gz
'b83cce6b91c7d19b8b320158ffc50fb4b2de454f5ac191c58d704234a1bf9005', # TensorFlow-1.14.0_swig-env.patch
'78c20aeaa7784b8ceb46238a81e8c2461137d28e0b576deeba8357d23fbe1f5a', # TensorFlow-2.1.0_fix-cuda-build.patch
# TensorFlow-2.1.0_fix-collective-all-reduce-strategy.patch
'093f4dd3ec372a82d50dffe32eea6821025cd1c406911a746c4367a40bc38486',
],
}),
]
Expand Down