Skip to content

Commit c943bca

Browse files
committed
TensorFlow: Upstream changes to git.
Changes: - Correct number of CPUs reported on mac. - Doc updates. Base CL: 107355041
1 parent a2257d0 commit c943bca

File tree

3 files changed

+17
-11
lines changed

3 files changed

+17
-11
lines changed

navbar.md

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# TensorFlow
2+
3+
* [Home][home]
4+
* [Getting Started](/tensorflow/g3doc/get_started/index.md)
5+
* [Mechanics](/tensorflow/g3doc/how_tos/index.md)
6+
* [Tutorials](/tensorflow/g3doc/tutorials/index.md)
7+
* [Python API](/tensorflow/g3doc/api_docs/python/index.md)
8+
* [C++ API](/tensorflow/g3doc/api_docs/cc/index.md)
9+
* [Other Resources](/tensorflow/g3doc/resources/index.md)
10+
11+
[home]: /tensorflow/g3doc/index.md

tensorflow/core/platform/posix/port.cc

+6
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
#ifdef SNAPPY
1010
#include <snappy.h>
1111
#endif
12+
#if defined(__APPLE__) && defined(__MACH__)
13+
#include <thread>
14+
#endif
1215

1316
namespace tensorflow {
1417
namespace port {
@@ -29,6 +32,9 @@ int NumSchedulableCPUs() {
2932
return CPU_COUNT(&cpuset);
3033
}
3134
perror("sched_getaffinity");
35+
#endif
36+
#if defined(__APPLE__) && defined(__MACH__)
37+
return std::thread::hardware_concurrency();
3238
#endif
3339
const int kDefaultCores = 4; // Semi-conservative guess
3440
fprintf(stderr, "can't determine number of CPU cores: assuming %d\n",

tensorflow/g3doc/navbar.md

-11
This file was deleted.

0 commit comments

Comments
 (0)