Skip to content
This repository was archived by the owner on Jan 3, 2023. It is now read-only.

Commit c94f406

Browse files
author
Roman Dubtsov
committed
Revert "Print more information about threading by default"
This reverts commit 0373e6b.
1 parent 0373e6b commit c94f406

File tree

3 files changed

+5
-16
lines changed

3 files changed

+5
-16
lines changed

tensorflow/core/common_runtime/direct_session.cc

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ Status NewThreadPoolFromThreadPoolOptions(
9292
const string& name = thread_pool_options.global_name();
9393
if (name.empty()) {
9494
// Session-local threadpool.
95-
VLOG(0) << "Direct session inter op parallelism threads for pool "
95+
VLOG(1) << "Direct session inter op parallelism threads for pool "
9696
<< pool_number << ": " << num_threads;
9797
*pool = new thread::ThreadPool(
9898
options.env, ThreadOptions(), strings::StrCat("Compute", pool_number),
@@ -253,23 +253,19 @@ DirectSession::DirectSession(const SessionOptions& options,
253253
operation_timeout_in_ms_(options_.config.operation_timeout_in_ms()) {
254254
const int thread_pool_size =
255255
options_.config.session_inter_op_thread_pool_size();
256-
LOG(INFO) << "thread_pool_size=" << thread_pool_size << "\n";
257256
if (thread_pool_size > 0) {
258257
for (int i = 0; i < thread_pool_size; ++i) {
259258
thread::ThreadPool* pool = nullptr;
260259
bool owned = false;
261-
LOG(INFO) << "creating thread pool #" << i << "\n";
262260
init_error_.Update(NewThreadPoolFromThreadPoolOptions(
263261
options_, options_.config.session_inter_op_thread_pool(i), i, &pool,
264262
&owned));
265263
thread_pools_.emplace_back(pool, owned);
266264
}
267265
} else if (options_.config.use_per_session_threads()) {
268-
LOG(INFO) << "using per-session thread pools\n";
269266
thread_pools_.emplace_back(NewThreadPoolFromSessionOptions(options_),
270267
true /* owned */);
271268
} else {
272-
LOG(INFO) << "using global thread pools\n";
273269
thread_pools_.emplace_back(GlobalThreadPool(options), false /* owned */);
274270
// Run locally if environment value of TF_NUM_INTEROP_THREADS is negative
275271
// and config.inter_op_parallelism_threads is unspecified or negative.
@@ -279,7 +275,6 @@ DirectSession::DirectSession(const SessionOptions& options,
279275
env_num_threads < 0)) {
280276
run_in_caller_thread_ = true;
281277
}
282-
LOG(INFO) << "run_in_caller_thread_=" << run_in_caller_thread_ << "\n";
283278
}
284279
// The default value of sync_on_finish will be flipped soon and this
285280
// environment variable will be removed as well.
@@ -590,14 +585,14 @@ Status DirectSession::RunInternal(int64 step_id, const RunOptions& run_options,
590585
if (executors_and_keys->items.size() > 1) {
591586
pool = thread_pools_[0].first;
592587
} else {
593-
VLOG(0) << "Executing Session::Run() synchronously!";
588+
VLOG(1) << "Executing Session::Run() synchronously!";
594589
}
595590
}
596591

597592
std::unique_ptr<RunHandler> handler;
598593
if (ShouldUseRunHandlerPool(run_options) &&
599594
run_options.experimental().use_run_handler_pool()) {
600-
VLOG(0) << "Using RunHandler to scheduler inter-op closures.";
595+
VLOG(1) << "Using RunHandler to scheduler inter-op closures.";
601596
handler = GetOrCreateRunHandlerPool(options_)->Get();
602597
}
603598
auto* handler_ptr = handler.get();

tensorflow/core/common_runtime/process_util.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ int32 NumInterOpThreadsFromSessionOptions(const SessionOptions& options) {
125125
thread::ThreadPool* NewThreadPoolFromSessionOptions(
126126
const SessionOptions& options) {
127127
const int32 num_threads = NumInterOpThreadsFromSessionOptions(options);
128-
LOG(INFO) << "Direct session inter op parallelism threads: " << num_threads;
128+
VLOG(1) << "Direct session inter op parallelism threads: " << num_threads;
129129
return new thread::ThreadPool(
130130
options.env, ThreadOptions(), "Compute", num_threads,
131131
!options.config.experimental().disable_thread_spinning(),

tensorflow/core/platform/posix/env.cc

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ limitations under the License.
2222
#include <sys/stat.h>
2323
#include <sys/time.h>
2424
#include <sys/types.h>
25-
#include <sys/syscall.h>
2625
#include <time.h>
2726
#include <unistd.h>
2827

@@ -53,12 +52,7 @@ class StdThread : public Thread {
5352
// thread_options is ignored.
5453
StdThread(const ThreadOptions& thread_options, const string& name,
5554
std::function<void()> fn)
56-
: thread_([fn, name](){
57-
LOG(INFO)
58-
<< " LWP " << (int)syscall(__NR_gettid)
59-
<< " has name " << name << "\n";
60-
fn();
61-
}) {
55+
: thread_(fn) {
6256
mutex_lock l(name_mutex);
6357
GetThreadNameRegistry().emplace(thread_.get_id(), name);
6458
}

0 commit comments

Comments
 (0)