Commit dc7f15fd authored by Jan Eric Lenssen's avatar Jan Eric Lenssen
Browse files

minor performance

parent 25700259
......@@ -86,7 +86,7 @@ const long* index, int num_threads) {
// Calculate weight gradient.
f = input[e_idx * ${M_in} + m_in_idx];
w_grad = f * b * grad_output[e_idx * ${M_out} + m_out_idx];
w_grad = f * b * g;
atomicAdd(&(grad_weight[w_idx]), w_grad);
// Not so efficient either, but not avoidable.
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment