Skip to content

Commit

Permalink
Hardcode dispatch.
Browse files Browse the repository at this point in the history
  • Loading branch information
satyajandhyala committed Sep 19, 2023
1 parent a15c782 commit eda748c
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,9 @@ export const createConv2DTransposeMatMulProgramInfo =
(outWidth % 4 === 0 && !isChannelsLast)) &&
outChannels % 4 === 0;

const dispatchX = !isChannelsLast ? outChannels : outWidth * outHeight;
const dispatchY = !isChannelsLast ? outWidth * outHeight : outChannels;
const workGroupSize: [number, number, number] =
isVec4 ? [8, 8, 1] : [dispatchX <= 4 ? 4 : 16, dispatchX > 4 && dispatchY <= 4 ? 4 : 16, 1];
const dispatchX = isChannelsLast ? outChannels : outWidth * outHeight;
const dispatchY = isChannelsLast ? outWidth * outHeight : outChannels;
const workGroupSize: [number, number, number] = isVec4 ? [8, 8, 1] : [4, 4, 1];
const elementsPerThread =
isVec4 ? [4, 4, 1] : [dispatchX <= 4 ? 1 : 2, dispatchX > 4 && dispatchY <= 4 ? 1 : 2, 1];
const dispatch = [
Expand Down

0 comments on commit eda748c

Please sign in to comment.