-
Notifications
You must be signed in to change notification settings - Fork 127
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
Conversation
int64* value); | ||
} // namespace tensorflow | ||
|
||
#endif // TENSORFLOW_CORE_KERNELS_UTIL_ENV_VAR_H_ |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TFRA_xxx
tensorflow_recommenders_addons/dynamic_embedding/core/kernels/cuckoo_hashtable_op.cc
Show resolved
Hide resolved
#include "tensorflow/core/platform/str_util.h" | ||
#include "tensorflow/core/platform/strcat.h" | ||
|
||
namespace tensorflow { |
There was a problem hiding this comment.
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
?
There was a problem hiding this comment.
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
<< "Error parsing TFRA_NUM_WORKER_THREADS_FOR_LOOKUP_TABLE_INSERT: " | ||
<< status; | ||
} | ||
if (num_worker_threads < 0 || |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
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.