-
Notifications
You must be signed in to change notification settings - Fork 24
SoftMax:CPU,MLU,CUDA三个平台重构 #105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
src/ops/softmax/bang/softmax_cnnl.cc
Outdated
| infiniopTensorDescriptor_t input_desc, | ||
| int axis, | ||
| infiniopTensorDescriptor_t output_desc) { | ||
| ASSERT_EQ(input_desc->ndim, output_desc->ndim); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
库函数不要assert,要返回错误status
include/ops/softmax/softmax.h
Outdated
| infiniopSoftmaxDescriptor_t *desc_ptr, | ||
| infiniopTensorDescriptor_t input_desc, int axis, infiniopTensorDescriptor_t output_desc); | ||
|
|
||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
softmax考虑加一下getworkspace接口吧
src/ops/softmax/bang/softmax_bang.cc
Outdated
| SoftmaxBangDescriptor_t *desc_ptr, | ||
| infiniopTensorDescriptor_t input_desc, int axis, infiniopTensorDescriptor_t output_desc) { | ||
|
|
||
| ASSERT_EQ(input_desc->ndim, output_desc->ndim); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
库函数不要assert,要返回错误status
src/ops/softmax/cpu/softmax_cpu.cc
Outdated
| infiniopStatus_t cpuCreateSoftmaxDescriptor(infiniopHandle_t handle, | ||
| SoftmaxCpuDescriptor_t *desc_ptr, | ||
| infiniopTensorDescriptor_t input_desc, int axis, infiniopTensorDescriptor_t output_desc) { | ||
| ASSERT_EQ(input_desc->ndim, output_desc->ndim); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
库函数不要assert,要返回错误status
src/ops/softmax/cuda/softmax_cuda.cc
Outdated
| SoftmaxCudaDescriptor_t *desc_ptr, | ||
| infiniopTensorDescriptor_t input_desc, int axis, infiniopTensorDescriptor_t output_desc) { | ||
|
|
||
| ASSERT_EQ(input_desc->ndim, output_desc->ndim); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
库函数不要assert,要返回错误status
No description provided.