Skip to content
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

[ET-VK] Minor improvements to conv2d pw and dw bounds check. #7815

Merged
merged 6 commits into from
Jan 27, 2025
2 changes: 1 addition & 1 deletion backends/vulkan/runtime/graph/ops/glsl/conv2d_dw.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ void main() {
div_by_x % out_limits.y,
div_by_x / out_limits.y);

if (any(greaterThanEqual(pos, out_limits))) {
if (pos.z >= out_limits.z) {
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ void main() {
pos.y *= BATCH_SIZE_Y;

// do not process if top pixel does not fit within the output range
if (any(greaterThanEqual(pos, out_limits))) {
if (pos.z >= out_limits.z) {
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ void main() {
div_by_x % out_limits.y,
div_by_x / out_limits.y);

if (any(greaterThanEqual(pos, out_limits))) {
if (pos.z >= out_limits.z) {
return;
}

Expand Down
2 changes: 1 addition & 1 deletion backends/vulkan/runtime/graph/ops/glsl/conv2d_pw.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ void main() {

// If the top left position is out of bounds, then this invocation will have
// no work to do.
if (any(greaterThanEqual(ivec3(pos[0], gpos.z), out_limits.xyz))) {
if (gpos.z >= out_limits.z) {
return;
}

Expand Down
Loading