Internal change

PiperOrigin-RevId: 234009849
This commit is contained in:
A. Unique TensorFlower 2019-02-14 12:45:00 -08:00 committed by TensorFlower Gardener
parent 9b542ce7ef
commit c314d0cd20
2 changed files with 4 additions and 2 deletions

View File

@ -102,7 +102,7 @@ class PosixEnv : public Env {
}
bool GetCurrentThreadName(string* name) override {
#ifdef __ANDROID__
#if defined(__ANDROID__) || defined(__EMSCRIPTEN__)
return false;
#else
char buf[100];

View File

@ -82,7 +82,9 @@ int NumTotalCPUs() {
}
int GetCurrentCPU() {
#if defined(__linux__) && !defined(__ANDROID__)
#if defined(__EMSCRIPTEN__)
return sched_getcpu();
#elif defined(__linux__) && !defined(__ANDROID__)
return sched_getcpu();
// Attempt to use cpuid on all other platforms. If that fails, perform a
// syscall.