Tina0717

@Tina0717

Joined on Oct 14, 2021

  • Q1. Explain your implementation. How do you optimize the performance of convolution?        我先 allocate 一個長寬為 imageWidth + 2halffilterSize、imageHeight + 2halffilterSize 的 array,用來儲存 padding 後的 image,並將 inputImage 的 data 儲存到 array 中。        接著,我產生一個 size 為 (imageWidth + 2*halffilterSize) * (imageHeight + 2*halffilterSize) 的 buffer,用來傳輸 padding image,以及一個 size 為 imageWidth * imageHeight 的 buffer,用來傳輸 outputImage。        在 kernel 中,NDRange 是 imageWidth * imageHeight,每個 work-item 會進行 filterWidth * filterWidth 次數的乘加,計算出 outputImage 的 data。        最後,allocate 一個 array 用來儲存讀取出的 Image,並將此 array 中的 data assign 到 hostFE 的 argument outputImage 中。
     Like  Bookmark
  • Q1-1: Does the vector utilization increase, decrease or stay the same as VECTOR_WIDTH changes? Why? VECTOR_WIDTH vector utilization 2 87.1% 4 81.8%
     Like  Bookmark