Fall back in the case of algorithm::convolution_winograd
Hello.
According to oneDNN documentation for a convolution with Winograd algorithm set in the descriptor it should silently fall back to the direct algorithm if convolution parameters does not satisfy the constraints. However, if I consider performance_profiling.cpp as an example and change algorithm::convolution_direct to algorithm::convolution_winograd the following error will emerge:
oneDNN error caught: Status: unimplemented Message: could not create a primitive descriptor iterator
May you please comment, should not the code in this case fall back to the direct method (with a possible further fallback to GEMM-based) instead of producing an error?
Best wishes, Aleksandr
Hello @alenik01 ,
oneDNN supports Direct and Winograd algorithms. For Direct algorithm oneDNN supports implicit dispatching between optimized and GEMM-based implementations based on convolution and hardware configuration. To enable such implicit dispatching between algorithms algorithm::convolution_auto should be used. In this case if Winograd is not available convolution will fallback into one of Direct algorithm implementations.
Regards, Igor Safonov
Good morning, @igorsafo .
Many thanks for the clarification. And is it correct, that dispatching is organised via going through a set of implementations in cpu_convolution_list.cpp and picking the first one, which fits all the requirements?
Best regards, Aleksandr Nikolaev
Yes, correct. As you can see there is a GEMM-based implementation after all optimized implementations which will be used in case they are not applicable.
Regards, Igor Safonov
Thanks a lot, it is now much more clear!
Best wishes, Aleksandr Nikolav