PC Lab 5: Diferență între versiuni

De la WikiLabs
Linia 20: Linia 20:
 
kcachegrind whateverprofile.callgrind // open profile.callgrind with kcachegrind
 
kcachegrind whateverprofile.callgrind // open profile.callgrind with kcachegrind
  
 
+
'''5''' Look over the report, and propose 3 leaf-functions (functions that do not call other functions) for offloading towards a coprocessor. Write the reason for choosing each of them, and how much is gained by offloading them. Assume coprocessor works at infinite clock, but data is transferred at 200 MB/s. Hint: use the callgraph (by installing the graphiviz package). Keep a snapshot with the analysis report as proof. Send result and snapshot(s) to the teacher.
  
  

Versiunea de la data 14 aprilie 2018 08:58

Session 5

Task: run an open-source profiler (valgrind & gprof or visual studio) and improve performance of keypoint extraction in ASIFT C++ code

1. Download ASIFT project from here: http://www.ipol.im/pub/art/2011/my-asift/

2. Run demo_ASIFT with the two included Adams as input images from the Sixtine Chapel. Horizontal result should look like this: Hadam.png

3. Modify code to only do "compute_asift_keypoints" (matching is not interesting, since it was covered in the previous session)

4. Run the valgrind profiler

eg, for dummy program:

g++ -std=c++11 dummy.cpp -o dummy (compile program dummy)

valgrind --tool=callgrind ./dummy (run the program with callgrind; generates a file callgrind.out.12345 that can be viewed with kcachegrind)

kcachegrind whateverprofile.callgrind // open profile.callgrind with kcachegrind

5 Look over the report, and propose 3 leaf-functions (functions that do not call other functions) for offloading towards a coprocessor. Write the reason for choosing each of them, and how much is gained by offloading them. Assume coprocessor works at infinite clock, but data is transferred at 200 MB/s. Hint: use the callgraph (by installing the graphiviz package). Keep a snapshot with the analysis report as proof. Send result and snapshot(s) to the teacher.


Note: Valgrind is also great for checking memory leaks:

valgrind --leak-check=full <path>

valgrind --tool=memcheck <path>


Points (out of 10) vs. expected performance ():

TBD