-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[RISCV64] [GSoC] Integrate SHL eltwise ops into OV #25674
Conversation
src/plugins/intel_cpu/tests/functional/custom/single_layer_tests/classes/conversion.cpp
Outdated
Show resolved
Hide resolved
...gins/intel_cpu/tests/functional/custom/subgraph_tests/src/common/concat_conv_sum_inplace.cpp
Outdated
Show resolved
Hide resolved
src/plugins/intel_cpu/tests/functional/custom/subgraph_tests/src/common/eltwise_caching.cpp
Outdated
Show resolved
Hide resolved
src/plugins/intel_cpu/tests/functional/custom/single_layer_tests/classes/eltwise.cpp
Outdated
Show resolved
Hide resolved
src/plugins/intel_cpu/tests/functional/custom/single_layer_tests/classes/conversion.cpp
Outdated
Show resolved
Hide resolved
src/plugins/intel_cpu/tests/functional/custom/single_layer_tests/classes/eltwise.cpp
Outdated
Show resolved
Hide resolved
src/plugins/intel_cpu/tests/functional/utils/riscv64/filter_cpu_info.cpp
Show resolved
Hide resolved
b5e3cd7
to
68cc344
Compare
build_jenkins |
build_jenkins |
@BHbean ARM and x64 builds are failed with the following problem:
Could you please fix code style? |
build_jenkins |
2 similar comments
build_jenkins |
build_jenkins |
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.
Thank you for the contribution to OpenVINO! 🎉
[RISCV64] add shlExecutor option for eltwise node [RISCV64] fix some errors with eltwise executor [RISCV64] add constructor def and vector initialization for ShlTensor [RISCV64] remove redundant debug print [RISCV64] skip failed tests [RISCV64] change way of invoking kernels [RISCV64] set shapes for ShlTensor before SHL add [RISCV64] simplify eltwise kernel invocation [RISCV64] integrate other eltwise ops [RISCV64] fix tests for some eltwise and activation ops [RISCV64] integrate PRelu and LeakyRelu op and fix related tests [RISCV64] integrate Maximum and Minimum op for the need of some tests [RISCV64] fix some tests [RISCV64] fix inaccurate problem with LeakyReLu op [RISCV64] fix some tests [RISCV64] enable debugging for riscv64 [RISCV64] update due to API changes
build_jenkins |
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.
No blocking issue from my perspective. Let follow-up remaining comments in separate PR (if needed)
namespace ov { | ||
namespace intel_cpu { | ||
|
||
inline void log_unsupported_prec(const std::vector<MemoryDescPtr>& srcDescs, |
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.
This function seems to be unused. Could you please delete?
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.
Sure!
for (const auto& srcDesc : srcDescs) { | ||
csinn_layout_enum supportedLayout = getShlDataLayoutByMemoryDesc(srcDesc); | ||
switch (eltwiseAttrs.algorithm) { | ||
case Algorithm::EltwisePrelu: | ||
// SHL PRelu op only supports these two kinds of layout | ||
if (!(supportedLayout == csinn_layout_enum::CSINN_LAYOUT_NC1HWC0 || supportedLayout == csinn_layout_enum::CSINN_LAYOUT_NCHW)) { | ||
DEBUG_LOG("src descriptor layout is unsupported by SHL Prelu op: ", srcDesc->serializeFormat()); | ||
return false; | ||
} | ||
break; | ||
default: | ||
if (supportedLayout == csinn_layout_enum::CSINN_LAYOUT_NULL) { | ||
DEBUG_LOG("src descriptor layout is unsupported by SHL: ", srcDesc->serializeFormat()); | ||
return false; | ||
} | ||
continue; | ||
} | ||
} | ||
for (const auto& dstDesc : dstDescs) { | ||
if (getShlDataLayoutByMemoryDesc(dstDesc) == csinn_layout_enum::CSINN_LAYOUT_NULL) { | ||
DEBUG_LOG("dst descriptor layout is unsupported by SHL: ", dstDesc->serializeFormat()); | ||
return false; | ||
} | ||
} |
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.
I see that Eltwise node creates only planar layoit desc (nchw) while this code checks doesn't prohibit nhwc layout. So what is really supported by SHL?
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.
I think SHL Eltwise node supports only planar layout by creating descriptors with only nchw
layout. This part of code does not block any other layouts as the eltwise ops in SHL does not constrain the layouts of their input and output (expect PRelu
). So in the future more layouts can be supported by creating descriptors with different layouts under different situations.
Details:
shl
lib:Add
,Sub
,Mul
,Div
,Maximum
,Minimum
,Exp
,ReLu
,LeakyReLu
andPReLu
Tickets: