"git@developer.sourcefind.cn:gaoqiong/migraphx.git" did not exist on "406afeb8ce9fc8dbecff21d4629b0ea97a9fba7b"
Commit bfa455a1 authored by Shucai Xiao's avatar Shucai Xiao
Browse files

clang format

parent 605cce41
......@@ -41,7 +41,7 @@ void logsoftmax(hipStream_t stream, argument result, argument arg, int axis)
// load data to lds and compute the batch max
size_t remaining_item_num = batch_item_num;
size_t round_item_num = (batch_item_num + block_size - 1) / block_size * block_size;
lds_data[max_block_size] = input[0];
lds_data[max_block_size] = input[0];
for(size_t i = thr_idx; i < round_item_num; i += block_size)
{
if(i < batch_item_num)
......@@ -61,7 +61,7 @@ void logsoftmax(hipStream_t stream, argument result, argument arg, int axis)
__syncthreads();
lds_data[max_block_size] = 0;
remaining_item_num = batch_item_num;
remaining_item_num = batch_item_num;
for(size_t i = thr_idx; i < round_item_num; i += block_size)
{
if(i < batch_item_num)
......
......@@ -41,7 +41,7 @@ void softmax(hipStream_t stream, argument result, argument arg, int axis)
// load data to lds and compute the batch max
size_t remaining_item_num = batch_item_num;
size_t round_item_num = (batch_item_num + block_size - 1) / block_size * block_size;
lds_data[max_block_size] = input[0];
lds_data[max_block_size] = input[0];
for(size_t i = thr_idx; i < round_item_num; i += block_size)
{
if(i < batch_item_num)
......@@ -62,7 +62,7 @@ void softmax(hipStream_t stream, argument result, argument arg, int axis)
__syncthreads();
lds_data[max_block_size] = 0;
remaining_item_num = batch_item_num;
remaining_item_num = batch_item_num;
for(size_t i = thr_idx; i < round_item_num; i += block_size)
{
if(i < batch_item_num)
......
......@@ -11,7 +11,8 @@ namespace gpu {
namespace device {
template <class T>
inline __device__ void reduce_max(T* data_ptr, size_t block_size, size_t thr_idx, size_t item_num, size_t max_index)
inline __device__ void
reduce_max(T* data_ptr, size_t block_size, size_t thr_idx, size_t item_num, size_t max_index)
{
while(true)
{
......@@ -38,7 +39,8 @@ inline __device__ void reduce_max(T* data_ptr, size_t block_size, size_t thr_idx
}
template <class T>
inline __device__ void reduce_min(T* data_ptr, size_t block_size, size_t thr_idx, size_t item_num, size_t min_index)
inline __device__ void
reduce_min(T* data_ptr, size_t block_size, size_t thr_idx, size_t item_num, size_t min_index)
{
while(true)
{
......@@ -65,7 +67,8 @@ inline __device__ void reduce_min(T* data_ptr, size_t block_size, size_t thr_idx
}
template <class T>
inline __device__ void reduce_sum(T* data_ptr, size_t block_size, size_t thr_idx, size_t item_num, size_t sum_index)
inline __device__ void
reduce_sum(T* data_ptr, size_t block_size, size_t thr_idx, size_t item_num, size_t sum_index)
{
while(true)
{
......
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