Skip to content

Commit

Permalink
initialize is_memcpy as false (#102)
Browse files Browse the repository at this point in the history
Co-authored-by: yuqing <[email protected]>
  • Loading branch information
xiayuqing0622 and xiayuqing0622 authored Nov 2, 2020
1 parent 5286462 commit 3236dd1
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/nnfusion/core/kernels/cpu/cpu_kernel_emitter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ namespace nnfusion

AntaresKEImp::Pointer m_antares_ke_imp;
std::string antares_code;
bool is_memcpy;
bool is_memcpy = false;
};

class SimdKernelEmitter : public CpuKernelEmitter
Expand Down
2 changes: 1 addition & 1 deletion src/nnfusion/core/kernels/cpu/eigen/concat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ thread_pool->ParallelFor(num_shards, func);
std::vector<uint32_t> input_strides;
uint64_t output_size, output_stride, dim0;
string dtype;
bool is_memcpy;
bool is_memcpy = false;
};
} // namespace cpu
} // namespace kernels
Expand Down
2 changes: 1 addition & 1 deletion src/nnfusion/core/kernels/cpu/general/reshape.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ namespace nnfusion
}

private:
bool is_memcpy;
bool is_memcpy = false;
bool is_noop;
nnfusion::Shape input_shape, output_shape;
};
Expand Down
2 changes: 1 addition & 1 deletion src/nnfusion/core/kernels/cuda_gpu/cuda_emitter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ namespace nnfusion
void set_launch_config() override {}
AntaresKEImp::Pointer m_antares_ke_imp;
std::string antares_code;
bool is_memcpy;
bool is_memcpy = false;
};

} // namespace cuda
Expand Down
2 changes: 1 addition & 1 deletion src/nnfusion/core/kernels/cuda_gpu/kernels/broadcast.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ namespace nnfusion
nnfusion::Shape result_shape;
size_t rank;
AxisSet axes;
bool is_memcpy;
bool is_memcpy = false;
};

class RocmBroadcast : public Broadcast
Expand Down
4 changes: 2 additions & 2 deletions src/nnfusion/core/kernels/cuda_gpu/kernels/concat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ namespace nnfusion
uint32_t block_size_x;
string dtype;
size_t axis;
bool is_memcpy;
bool is_memcpy = false;
};
} // namespace cuda
} // namespace kernels
Expand Down Expand Up @@ -473,7 +473,7 @@ namespace nnfusion
uint32_t nthreads;
uint32_t output_stride;
size_t axis;
bool is_memcpy;
bool is_memcpy = false;
};
} // namespace cuda
} // namespace kernels
Expand Down
4 changes: 2 additions & 2 deletions src/nnfusion/core/kernels/cuda_gpu/kernels/reshape.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ namespace nnfusion
nnfusion::Shape result_shape;
nnfusion::AxisVector input_order;
shared_ptr<nnfusion::op::Reshape> reshape;
bool is_memcpy;
bool is_memcpy = false;
bool is_noop;
};

Expand Down Expand Up @@ -90,7 +90,7 @@ namespace nnfusion
nnfusion::Shape result_shape;
nnfusion::AxisVector input_order;
shared_ptr<nnfusion::op::Reshape> reshape;
bool is_memcpy;
bool is_memcpy = false;
bool is_noop;
};

Expand Down

0 comments on commit 3236dd1

Please sign in to comment.