Skip to content

Commit

Permalink
Include disable-avx512-extensions patch for TF 2.15.1
Browse files Browse the repository at this point in the history
  • Loading branch information
yqshao committed Jun 7, 2024
1 parent 1bb28df commit 13109c3
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ exts_list = [
'TensorFlow-2.15.1_fix-flatbuffer-license.patch',
'TensorFlow-2.15.1_fix-pybind11-build.patch',
'TensorFlow-2.15.1_fix-cuda_build_defs.patch',
'TensorFlow-2.15.1_disable-avx512-extensions.patch',
],
'source_tmpl': 'v%(version)s.tar.gz',
'source_urls': ['https://github.com/tensorflow/tensorflow/archive/'],
Expand Down Expand Up @@ -210,6 +211,8 @@ exts_list = [
'3bb350ac92ab99c63c951c96b3b0160699f5f16822b64f72111ebfd2275cafce'},
{'TensorFlow-2.15.1_fix-cuda_build_defs.patch':
'091581a7c4fc2fc7af282cab6661632c29029d2f36eccb6695ffa5783e065f88'},
{'TensorFlow-2.15.1_disable-avx512-extensions.patch':
'506ceecff67237eed9cd9e9e114bc1461f35a343f77f83cb3dab710aa701dc0f'},
],
}),
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ exts_list = [
'TensorFlow-2.15.1_add-default-shell-env.patch',
'TensorFlow-2.15.1_fix-flatbuffer-license.patch',
'TensorFlow-2.15.1_fix-pybind11-build.patch',
'TensorFlow-2.15.1_disable-avx512-extensions.patch',
],
'source_tmpl': 'v%(version)s.tar.gz',
'source_urls': ['https://github.com/tensorflow/tensorflow/archive/'],
Expand Down Expand Up @@ -195,6 +196,8 @@ exts_list = [
'2c04d5095977a628a238dbf93c5fada7159c86752a7183e64e0cf7c7ab00caf4'},
{'TensorFlow-2.15.1_fix-pybind11-build.patch':
'3bb350ac92ab99c63c951c96b3b0160699f5f16822b64f72111ebfd2275cafce'},
{'TensorFlow-2.15.1_disable-avx512-extensions.patch':
'506ceecff67237eed9cd9e9e114bc1461f35a343f77f83cb3dab710aa701dc0f'},
],
}),
]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
(Some of the) AVX512 extensions to Eigen introduced by TensorFlow are broken and return wrong values.
So disable them for now to keep AVX512 in the other code parts working.
See https://github.com/tensorflow/tensorflow/issues/49944

Author: Alexander Grund (TU Dresden)

diff --git a/third_party/xla/third_party/tsl/tsl/framework/fixedpoint/FixedPoint.h b/third_party/xla/third_party/tsl/tsl/framework/fixedpoint/FixedPoint.h
index 5301914ad37..8923bfed7bf 100644
--- a/third_party/xla/third_party/tsl/tsl/framework/fixedpoint/FixedPoint.h
+++ b/third_party/xla/third_party/tsl/tsl/framework/fixedpoint/FixedPoint.h
@@ -20,7 +20,7 @@ limitations under the License.
#include "tsl/framework/fixedpoint_types.h"

// Use optimized implementations whenever available
-#if defined(EIGEN_VECTORIZE_AVX512DQ) || defined(EIGEN_VECTORIZE_AVX512BW)
+#if 0
#include "tsl/framework/fixedpoint/PacketMathAVX512.h"
#include "tsl/framework/fixedpoint/TypeCastingAVX512.h"

0 comments on commit 13109c3

Please sign in to comment.