Skip to content

Latest commit

 

History

History
50 lines (36 loc) · 882 Bytes

Assignment3.md

File metadata and controls

50 lines (36 loc) · 882 Bytes

Assignment 3: A Simple CUDA Renderer

如果是从scoop安装的 cuda,需要设置环境变量CUDA_PATH=C:/Users/<User>/scoop/apps/cuda,或者在 xmake 里指定目录。

xmake f --cuda=C:/Users/<User>/scoop/apps/cuda

Part 1: CUDA Warm-Up 1: SAXPY

xmake run cudaSaxpy

比较

xmake run cudaSaxpy -n 20000000
xmake run saxpy

Part 2: CUDA Warm-Up 2: Parallel Prefix-Sum

xmake run cudaScan

检查性能

TODO:perl 脚本不跨平台,先不要使用。

cd src/Assignment3/scan
perl checker.pl scan

Part 3: A Simple Circle Renderer

wingdi.hcircleRenderer.henum SceneNamePATTERN命名冲突,改成PATTERN_

xmake run render
xmake run render -r cpuref rgb
xmake run render -r cpuref snow

检查性能。

cd src/Assignment3/render
python checker.py