Lower unsupported pooling sizes for the CPU to Reference backend
https://github.com/ROCm/AMDMIGraphX/pull/3081/files#r1638157103
Hi @umangyadav , I would like to take this if no one is working on this.. (I am new to the graph compiler). Here is my rough idea-
Suggested Changes:
Upon checking OneDNN has a kernel size limitation (for Direct Algorithm on SIMD): specifies a maximum dimension size of 14 for the kernel ("weights tensor"). This is noe implemented in MIGraphX, which may lead to failures during execution.
Check Kernel Size and Padding: Add a check for the kernel size and padding limits before applying the OneDNN pooling operator.
Fallback to Reference Backend: If the condition fails (e.g., kernel size exceeds 14 ), replace the pooling operation with a reference backend operation. For invalid configurations, the pooling operation is replaced with a reference backend pooling operator (ref::pooling) CPU based fallback. Valid configurations continue to use the OneDNN pooling operation (dnnl::pooling)
let me know you have suggestions!
@aditya-167 Thanks for taking initiative. Your suggested changes look good. I suggest you raise a PR with suggested changes and tag @pfultz2 or @CharlieL7 as reviewers who can help you more with changes.