Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jerrrrry
infinicore
Commits
82adff3d
Commit
82adff3d
authored
Apr 14, 2025
by
Zimin Li
Browse files
issue/127: add a blank line between @tparam and @param for comments in cuda elementwise files
parent
d54312d0
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
+8
-0
src/infiniop/elementwise/cuda/elementwise_cuda.cuh
src/infiniop/elementwise/cuda/elementwise_cuda.cuh
+7
-0
src/infiniop/elementwise/cuda/elementwise_cuda_api.cuh
src/infiniop/elementwise/cuda/elementwise_cuda_api.cuh
+1
-0
No files found.
src/infiniop/elementwise/cuda/elementwise_cuda.cuh
View file @
82adff3d
...
@@ -12,6 +12,7 @@ namespace op::elementwise::cuda {
...
@@ -12,6 +12,7 @@ namespace op::elementwise::cuda {
* @brief Casts an untyped device pointer to a typed pointer of type T.
* @brief Casts an untyped device pointer to a typed pointer of type T.
*
*
* @tparam T Desired pointer type.
* @tparam T Desired pointer type.
*
* @param ptr Untyped pointer.
* @param ptr Untyped pointer.
* @return Pointer of type const T*.
* @return Pointer of type const T*.
*/
*/
...
@@ -72,6 +73,7 @@ struct InputIndexer {
...
@@ -72,6 +73,7 @@ struct InputIndexer {
*
*
* @tparam F Callable type.
* @tparam F Callable type.
* @tparam Is Compile-time index sequence.
* @tparam Is Compile-time index sequence.
*
* @param f Callable to invoke with index constants.
* @param f Callable to invoke with index constants.
*/
*/
template
<
typename
F
,
size_t
...
Is
>
template
<
typename
F
,
size_t
...
Is
>
...
@@ -86,6 +88,7 @@ __device__ __forceinline__ void unpackInputsAndApply(F &&f, std::index_sequence<
...
@@ -86,6 +88,7 @@ __device__ __forceinline__ void unpackInputsAndApply(F &&f, std::index_sequence<
* @tparam Op Operator type implementing operator()(Tdata...).
* @tparam Op Operator type implementing operator()(Tdata...).
* @tparam Tdata Common data type for inputs and output.
* @tparam Tdata Common data type for inputs and output.
* @tparam Args Additional arguments to pass to the operator.
* @tparam Args Additional arguments to pass to the operator.
*
* @param output_size Total number of output elements.
* @param output_size Total number of output elements.
* @param ndim Number of dimensions in tensors.
* @param ndim Number of dimensions in tensors.
* @param output_contiguous Whether the output tensor is contiguous in memory.
* @param output_contiguous Whether the output tensor is contiguous in memory.
...
@@ -138,6 +141,7 @@ INFINIOP_CUDA_KERNEL elementwiseKernel(
...
@@ -138,6 +141,7 @@ INFINIOP_CUDA_KERNEL elementwiseKernel(
* @tparam Op Operator type implementing a templated operator() for (Tout, Tin...).
* @tparam Op Operator type implementing a templated operator() for (Tout, Tin...).
* @tparam Tout Output data type.
* @tparam Tout Output data type.
* @tparam Tin Variadic input data types.
* @tparam Tin Variadic input data types.
*
* @param output_size Total number of output elements.
* @param output_size Total number of output elements.
* @param ndim Number of dimensions in the tensors.
* @param ndim Number of dimensions in the tensors.
* @param output_contiguous Whether the output tensor is contiguous.
* @param output_contiguous Whether the output tensor is contiguous.
...
@@ -195,6 +199,7 @@ struct DeviceImpl::Opaque {
...
@@ -195,6 +199,7 @@ struct DeviceImpl::Opaque {
* @tparam Op Functor representing the elementwise operation.
* @tparam Op Functor representing the elementwise operation.
* @tparam Tdata Data type of both input and output tensors.
* @tparam Tdata Data type of both input and output tensors.
* @tparam Args Optional additional arguments passed to the operation.
* @tparam Args Optional additional arguments passed to the operation.
*
* @param info Metadata about the operation including shape, size, and dimensionality.
* @param info Metadata about the operation including shape, size, and dimensionality.
* @param workspace Temporary workspace used for storing metadata on device.
* @param workspace Temporary workspace used for storing metadata on device.
* @param output Pointer to the output buffer.
* @param output Pointer to the output buffer.
...
@@ -227,6 +232,7 @@ struct DeviceImpl::Opaque {
...
@@ -227,6 +232,7 @@ struct DeviceImpl::Opaque {
* @tparam Tout Data type of the output tensor.
* @tparam Tout Data type of the output tensor.
* @tparam Tin... Data types of the input tensors.
* @tparam Tin... Data types of the input tensors.
* @tparam Args Optional additional arguments passed to the operation.(UNUSED)
* @tparam Args Optional additional arguments passed to the operation.(UNUSED)
*
* @param info Metadata about the operation including shape, size, and dimensionality.
* @param info Metadata about the operation including shape, size, and dimensionality.
* @param workspace Temporary workspace used for storing metadata on device.
* @param workspace Temporary workspace used for storing metadata on device.
* @param output Pointer to the output buffer.
* @param output Pointer to the output buffer.
...
@@ -255,6 +261,7 @@ private:
...
@@ -255,6 +261,7 @@ private:
* @brief Transfers elementwise operation metadata and input pointers from host to device memory.
* @brief Transfers elementwise operation metadata and input pointers from host to device memory.
*
*
* @tparam N Number of input tensors.
* @tparam N Number of input tensors.
*
* @param info Elementwise operation metadata (shapes, strides, flags, etc.).
* @param info Elementwise operation metadata (shapes, strides, flags, etc.).
* @param workspace Pointer to device workspace memory for storing metadata and input pointers.
* @param workspace Pointer to device workspace memory for storing metadata and input pointers.
* @param h_inputs_arr Host array of input tensor pointers.
* @param h_inputs_arr Host array of input tensor pointers.
...
...
src/infiniop/elementwise/cuda/elementwise_cuda_api.cuh
View file @
82adff3d
...
@@ -57,6 +57,7 @@ public:
...
@@ -57,6 +57,7 @@ public:
* @tparam Tout Output data type.
* @tparam Tout Output data type.
* @tparam Tin... Input data types (must match Op::num_inputs).
* @tparam Tin... Input data types (must match Op::num_inputs).
* @tparam Args... Additional arguments passed to the operation.
* @tparam Args... Additional arguments passed to the operation.
*
* @param info Metadata describing tensor shapes, strides, etc.
* @param info Metadata describing tensor shapes, strides, etc.
* @param workspace Pointer to workspace buffer on device.
* @param workspace Pointer to workspace buffer on device.
* @param output Pointer to output buffer on device.
* @param output Pointer to output buffer on device.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment