Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

For LaunchTensorsInsert, num_worker_threads is used only when TFRA_NUM_WORKER_THREADS_FOR_LOOKUP_TABLE_INSERT env var is set to k, where k>0 and k<tf current number of cpu worker threads. Otherwise, nothing will change. #51

Merged
merged 1 commit into from
Apr 22, 2021

Conversation

Mr-Nineteen
Copy link
Contributor

@Mr-Nineteen Mr-Nineteen commented Apr 22, 2021

For LaunchTensorsInsert, num_worker_threads is used only when TFRA_NUM_WORKER_THREADS_FOR_LOOKUP_TABLE_INSERT env var is set to k, where k>0 and k<tf current number of cpu worker threads. Otherwise, nothing will change.

int64* value);
} // namespace tensorflow

#endif // TENSORFLOW_CORE_KERNELS_UTIL_ENV_VAR_H_
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add new line at the end of the file.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Delete the file, rely on the TensorFlow library

@@ -106,9 +107,27 @@ struct LaunchTensorsInsert<CPUDevice, K, V, J> {
}
};
auto& worker_threads = *context->device()->tensorflow_cpu_worker_threads();
// Only use num_worker_threads when
// TF_NUM_WORKER_THREADS_FOR_LOOKUP_TABLE_INSERT env var is set to k where k
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TFRA_xxx

#include "tensorflow/core/platform/str_util.h"
#include "tensorflow/core/platform/strcat.h"

namespace tensorflow {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we need a special internal namespace , recommenders_addons ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Delete the file, rely on the TensorFlow library

@Mr-Nineteen Mr-Nineteen changed the title For LaunchTensorsInsert, num_worker_threads is used only when TF_NUM_WORKER_THREADS_FOR_LOOKUP_TABLE_INSERT env var is set to k, where k>0 and k<tf current number of cpu worker threads. Otherwise, nothing will change. For LaunchTensorsInsert, num_worker_threads is used only when TFRA_NUM_WORKER_THREADS_FOR_LOOKUP_TABLE_INSERT env var is set to k, where k>0 and k<tf current number of cpu worker threads. Otherwise, nothing will change. Apr 22, 2021
<< "Error parsing TFRA_NUM_WORKER_THREADS_FOR_LOOKUP_TABLE_INSERT: "
<< status;
}
if (num_worker_threads < 0 ||
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TFRA_NUM_WORKER_THREADS_FOR_LOOKUP_TABLE_INSERT=0, num_worker_threads will keep zero..

…WORKER_THREADS_FOR_LOOKUP_TABLE_INSERT env var is set to k, where k>0 and k<tf current number of cpu worker threads. Otherwise, nothing will change.
Copy link
Member

@rhdong rhdong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rhdong rhdong merged commit 1e13c83 into tensorflow:master Apr 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants