From 7f45b9511aa1cf18f36709627a01a59bc1d3e661 Mon Sep 17 00:00:00 2001 From: minqiyang Date: Mon, 7 Jan 2019 22:54:01 +0800 Subject: [PATCH] Polish code --- paddle/fluid/framework/operator.cc | 1 + paddle/fluid/operators/hash_op.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/paddle/fluid/framework/operator.cc b/paddle/fluid/framework/operator.cc index f10da22ae..afece8e3d 100644 --- a/paddle/fluid/framework/operator.cc +++ b/paddle/fluid/framework/operator.cc @@ -29,6 +29,7 @@ DECLARE_bool(benchmark); DEFINE_bool(check_nan_inf, false, "Checking whether operator produce NAN/INF or not. It will be " "extremely slow so please use this flag wisely."); +DEFINE_int32(inner_op_parallelism, 0, "number of threads for inner op"); namespace paddle { namespace framework { diff --git a/paddle/fluid/operators/hash_op.h b/paddle/fluid/operators/hash_op.h index 9781bb0f4..1ed3ffe9a 100644 --- a/paddle/fluid/operators/hash_op.h +++ b/paddle/fluid/operators/hash_op.h @@ -45,7 +45,7 @@ class HashKerel : public framework::OpKernel { for (int idx = 0; idx < seq_length; ++idx) { for (int ihash = 0; ihash != 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; } -- GitLab