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
fe9c4aa5
Commit
fe9c4aa5
authored
Apr 15, 2025
by
Zimin Li
Browse files
issue/127: capitalize the arguments of the CREATE_ELEMENTWISE_PLATFORM_DESCRIPTOR marcos
parent
256a5e3a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
19 deletions
+19
-19
src/infiniop/elementwise/cpu/elementwise_cpu.h
src/infiniop/elementwise/cpu/elementwise_cpu.h
+9
-9
src/infiniop/elementwise/cuda/elementwise_cuda_api.cuh
src/infiniop/elementwise/cuda/elementwise_cuda_api.cuh
+10
-10
No files found.
src/infiniop/elementwise/cpu/elementwise_cpu.h
View file @
fe9c4aa5
...
...
@@ -9,23 +9,23 @@
* @brief Define the process for initializing a Descriptor of an elementwise operation
* for its CPU implementation
*
* @param
handle
The device handle.
* @param
dtype
The output dtype.
* @param
out_desc
The output tensor descriptor.
* @param
input_desc_vec
A vector containing input tensor descriptors.
* @param
HANDLE
The device handle.
* @param
DTYPE
The output dtype.
* @param
OUT_DESC
The output tensor descriptor.
* @param
INPUT_DESC_VEC
A vector containing input tensor descriptors.
*/
#define CREATE_ELEMENTWISE_CPU_DESCRIPTOR(
handle, dtype, out_desc, input_desc_vec
) \
#define CREATE_ELEMENTWISE_CPU_DESCRIPTOR(
HANDLE, DTYPE, OUT_DESC, INPUT_DESC_VEC
) \
\
auto info_result = op::elementwise::ElementwiseInfo::create(
out_desc, input_desc_vec
); \
auto info_result = op::elementwise::ElementwiseInfo::create(
OUT_DESC, INPUT_DESC_VEC
); \
CHECK_RESULT(info_result); \
\
*desc_ptr = new Descriptor( \
dtype
, \
DTYPE
, \
info_result.take(), \
nullptr, \
0, \
handle
->device, \
handle
->device_id);
HANDLE
->device, \
HANDLE
->device_id);
namespace
op
::
elementwise
::
cpu
{
...
...
src/infiniop/elementwise/cuda/elementwise_cuda_api.cuh
View file @
fe9c4aa5
...
...
@@ -83,27 +83,27 @@ public:
* @brief Define the process for initializing a Descriptor of an elementwise operation
* for its CUDA implementation
*
* @param
handle
The device handle.
* @param
dtype
The output dtype.
* @param
out_desc
The output tensor descriptor.
* @param
input_desc_vec
A vector containing input tensor descriptors.
* @param
HANDLE
The device handle.
* @param
DTYPE
The output dtype.
* @param
OUT_DESC
The output tensor descriptor.
* @param
INPUT_DESC_VEC
A vector containing input tensor descriptors.
*/
#define CREATE_ELEMENTWISE_CUDA_DESCRIPTOR(
handle, dtype, out_desc, input_desc_vec
) \
#define CREATE_ELEMENTWISE_CUDA_DESCRIPTOR(
HANDLE, DTYPE, OUT_DESC, INPUT_DESC_VEC
) \
\
auto info_result = op::elementwise::ElementwiseInfo::create(
out_desc, input_desc_vec
); \
auto info_result = op::elementwise::ElementwiseInfo::create(
OUT_DESC, INPUT_DESC_VEC
); \
CHECK_RESULT(info_result); \
auto info = info_result.take(); \
auto workspace_size = info.getMetaMemSize() + info.getInputSize() * sizeof(void *); \
\
auto device_impl_result = op::elementwise::cuda::DeviceImpl::create(
handle
->internal()); \
auto device_impl_result = op::elementwise::cuda::DeviceImpl::create(
HANDLE
->internal()); \
CHECK_RESULT(device_impl_result); \
\
*desc_ptr = new Descriptor( \
dtype
, \
DTYPE
, \
std::move(info), \
std::move(device_impl_result.take()), \
workspace_size, \
handle
->device, \
handle
->device_id);
HANDLE
->device, \
HANDLE
->device_id);
#endif // __INFINIOP_ELEMENTWISE_CUDA_API_H__
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