Commit 42b24bd1 authored by Shucai Xiao's avatar Shucai Xiao
Browse files

clang format

parent b9575730
......@@ -83,8 +83,8 @@ void logsoftmax(hipStream_t stream, argument result, argument arg, int axis)
for(size_t i = thr_idx; i < batch_item_num; i += block_size)
{
data_idx[axis] = i;
output[data_idx] = input[data_idx] - log_batch_sum;
data_idx[axis] = i;
output[data_idx] = input[data_idx] - log_batch_sum;
}
});
});
......
......@@ -83,9 +83,9 @@ void softmax(hipStream_t stream, argument result, argument arg, int axis)
for(size_t i = thr_idx; i < batch_item_num; i += block_size)
{
data_idx[axis] = i;
auto val = input[data_idx] - batch_max;
output[data_idx] = ::exp(to_hip_type(val)) / batch_sum;
data_idx[axis] = i;
auto val = input[data_idx] - batch_max;
output[data_idx] = ::exp(to_hip_type(val)) / batch_sum;
}
});
});
......
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