Polish code

revert-15207-remove_op_handle_lock_and_fix_var
minqiyang 7 years ago
parent 68a07328fa
commit 7f45b9511a

@ -29,6 +29,7 @@ DECLARE_bool(benchmark);
DEFINE_bool(check_nan_inf, false, DEFINE_bool(check_nan_inf, false,
"Checking whether operator produce NAN/INF or not. It will be " "Checking whether operator produce NAN/INF or not. It will be "
"extremely slow so please use this flag wisely."); "extremely slow so please use this flag wisely.");
DEFINE_int32(inner_op_parallelism, 0, "number of threads for inner op");
namespace paddle { namespace paddle {
namespace framework { namespace framework {

@ -45,7 +45,7 @@ class HashKerel : public framework::OpKernel<T> {
for (int idx = 0; idx < seq_length; ++idx) { for (int idx = 0; idx < seq_length; ++idx) {
for (int ihash = 0; ihash != num_hash; ++ihash) { for (int ihash = 0; ihash != num_hash; ++ihash) {
output[idx * num_hash + ihash] = output[idx * num_hash + ihash] =
XXH64(input, sizeof(int) * last_dim, ihash) % mod_by; XXH32(input, sizeof(int) * last_dim, ihash) % mod_by;
} }
input += last_dim; input += last_dim;
} }

Loading…
Cancel
Save