test=develop, accelerate_hs_op and add prefetch with is_sparse

revert-15207-remove_op_handle_lock_and_fix_var
JiabinYang 7 years ago
parent 1bec52f581
commit 1a8cbb6799

@ -40,8 +40,9 @@ using platform::Transform;
static std::vector<int64_t> PathToRows(const framework::LoDTensor& path) {
std::set<int64_t> rows;
const int64_t* paths = path.data<int64_t>();
for (int64_t i = 0; i < path.numel(); ++i) {
int64_t row = path.data<int64_t>()[i];
int64_t row = paths[i];
if (row < 0) {
continue;
}

@ -5013,9 +5013,10 @@ def nce(input,
else:
num_neg_samples = int(num_neg_samples)
remote_prefetch = False
if os.environ.get('PADDLE_ENABLE_REMOTE_PREFETCH'):
remote_prefetch = True
remote_prefetch = is_sparse
print(
"With sparse mode, if your models has only small parameter prefetch may cause speed down"
)
attrs = {
'num_total_classes': int(num_total_classes),
@ -5133,10 +5134,10 @@ def hsigmoid(input,
pass
weights = None
remote_prefetch = False
if os.environ.get('PADDLE_ENABLE_REMOTE_PREFETCH'):
remote_prefetch = True
remote_prefetch = is_sparse
print(
"With sparse mode, if your models has only small parameter prefetch may cause speed down"
)
if not is_custom:
weights = helper.create_parameter(
attr=helper.param_attr,

Loading…
Cancel
Save