Skip to content

Commit afd6ca0

Browse files
committed
Add patch of tensorflow/python/lib/core/bfloat16.cc
1 parent 3448551 commit afd6ca0

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

tensorflow/tensorflow-2.3.0.patch

+36
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,39 @@
1+
diff -Nrup a/tensorflow/python/lib/core/bfloat16.cc b/tensorflow/python/lib/core/bfloat16.cc
2+
--- a/tensorflow/python/lib/core/bfloat16.cc 2020-09-11 15:47:48.636000000 +0800
3+
+++ b/tensorflow/python/lib/core/bfloat16.cc 2020-09-11 15:50:34.264000000 +0800
4+
@@ -660,26 +660,26 @@ bool Initialize() {
5+
const std::array<int, 3> compare_types = {
6+
{npy_bfloat16_, npy_bfloat16_, NPY_BOOL}};
7+
8+
- if (!register_ufunc("equal", CompareUFunc<Bfloat16EqFunctor>,
9+
+ if (!register_ufunc("equal", (PyUFuncGenericFunction) CompareUFunc<Bfloat16EqFunctor>,
10+
compare_types)) {
11+
return false;
12+
}
13+
- if (!register_ufunc("not_equal", CompareUFunc<Bfloat16NeFunctor>,
14+
+ if (!register_ufunc("not_equal", (PyUFuncGenericFunction) CompareUFunc<Bfloat16NeFunctor>,
15+
compare_types)) {
16+
return false;
17+
}
18+
- if (!register_ufunc("less", CompareUFunc<Bfloat16LtFunctor>, compare_types)) {
19+
+ if (!register_ufunc("less", (PyUFuncGenericFunction) CompareUFunc<Bfloat16LtFunctor>, compare_types)) {
20+
return false;
21+
}
22+
- if (!register_ufunc("greater", CompareUFunc<Bfloat16GtFunctor>,
23+
+ if (!register_ufunc("greater", (PyUFuncGenericFunction) CompareUFunc<Bfloat16GtFunctor>,
24+
compare_types)) {
25+
return false;
26+
}
27+
- if (!register_ufunc("less_equal", CompareUFunc<Bfloat16LeFunctor>,
28+
+ if (!register_ufunc("less_equal", (PyUFuncGenericFunction) CompareUFunc<Bfloat16LeFunctor>,
29+
compare_types)) {
30+
return false;
31+
}
32+
- if (!register_ufunc("greater_equal", CompareUFunc<Bfloat16GeFunctor>,
33+
+ if (!register_ufunc("greater_equal", (PyUFuncGenericFunction) CompareUFunc<Bfloat16GeFunctor>,
34+
compare_types)) {
35+
return false;
36+
}
137
diff -Nrup a/third_party/nccl/build_defs.bzl.tpl b/third_party/nccl/build_defs.bzl.tpl
238
--- a/third_party/nccl/build_defs.bzl.tpl 2020-09-10 14:39:56.212000000 +0800
339
+++ b/third_party/nccl/build_defs.bzl.tpl 2020-09-10 14:39:27.760000000 +0800

0 commit comments

Comments
 (0)