Giter Site home page Giter Site logo

hust_asc_2021_recruitment's Introduction

题目描述

9-point stencil 算法是矩阵计算中最为基础的一种算法,可以从输入的 png 图像中读取像素点信息然后对非边界网格进行加权模糊计算,从而得出结果像素点并生成输出 png 图像。该算法可以从图像计算延伸到各种矩阵数值计算领域中。 比赛考核程序 nTrials 次循环处理输入图像所用总时间,以排除特殊优化方法所带来的单次计算性能优势,因此,不可在 nTrials 循环做并行划分。计时不包括图片读写的前后处理时间,耗时以程序最终输出的 Total 时间为准。 你需要修改的是位于stencil\src\stencil.cc 的函数void ApplyStencil, 该函数实现了多维数组表达式的运算。你需要想办法将该串行代码进行优化。

Checkpoints:

  • 成功编译该代码
  • 成功运行该串行代码,输入IPCC.png。得到输出data.txt和 output.png,作为baseline
  • 了解该函数的基本原理
  • 接下来,你有两方面的优化可以进行
    1. 将该函数ApplyStencil并行化
      • 提示:你可以使用openmp、openmpi、pthread、std::thread等方法实现并行化
    2. 进行串行的算法的性能调优,这些优化同样可以应用到后面的并行算法实现中。
      • 提示:几个可能的方向:优化程序访存、减少冗余计算、使用SIMD指令集
    • 注意:程序输出结果可以有一定的误差,但我们不希望你通过损失精度的方式来获得性能提升
  • 成功编译修改后的代码
  • 成功运行并比较精度,比较优化前后程序运行时间

提交代码

截止时间12月07日00:01分(星期一凌晨),但在此之前,当你觉得你的优化起到2~3倍以上的效果之后,请和学长(QQ:1245835950)进行反馈。我们会决定是否直接邀请你加入到今年ASC2021的工作中。

hust_asc_2021_recruitment's People

Contributors

st1page avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.