Merge pull request #22656 from dkurt:halide_fixes

* Fixes for Halide
* Enable some Halide tests
This commit is contained in:
Dmitry Kurtaev
2022-10-21 17:49:49 +03:00
committed by GitHub
parent 8e5f37f87c
commit 35b2cff295
3 changed files with 26 additions and 18 deletions

View File

@@ -1173,6 +1173,12 @@ public:
// Halide::argmax returns tuple (r.x, r.y, max).
Halide::Tuple res = argmax(inputBuffer(kx, ky, c, n));
if (!computeMaxIdx)
{
top(x, y, c, n) = res[2];
return Ptr<BackendNode>(new HalideBackendNode(top));
}
// Compute offset from argmax in range [0, kernel_size).
Halide::Expr max_index;
if(paddingLeft || paddingTop)