当前位置:天才代写 > 作业代写,留学生作业代写-北美、澳洲、英国等靠谱代写 > 实验代写 Problem代写 function代写 report代写 Optimize代写

实验代写 Problem代写 function代写 report代写 Optimize代写

2021-04-26 13:59 星期一 所属: 作业代写,留学生作业代写-北美、澳洲、英国等靠谱代写 浏览:839

实验代写

Lab #1: Hardware Counters and Profiling

实验代写 Problem 1: Node Profile, Edge Profile, and Path Profile Instrument the function “func” of program prof.c to gather the node profile

Problem 1: Node Profile, Edge Profile, and Path Profile 实验代写

Instrument the function “func” of program prof.c to gather the node profile, the edge profile and the path profile of the function. Treat the “for” loops in the function “func” as nodes, i.e., you don’t need to go in the for loops to generate paths. The “func” function has a number of arguments. The corresponding main function provides two possible input sets for those arguments. You should do the  profiling for both input sets. You need to submit 3 versions for  the program, each version measuring one type of profile. Draw the CFG of the “func” function and include it in the report.

实验代写
实验代写

Problem 2: Practice Using Hardware Counters and Optimize for Memory Hierarchy 实验代写

The PAPI Hardware Counter Library: The PAPI library has been installed  under  the  directory /usr. The library binaries are in /usr/lib, and the library header files are in /usr/include. When you need to compile your program with PAPI, you can use the command line: “gcc -I/ usr/include your_program_file -L/usr/lib -lpapi”.

In this problem you are required to using PAPI hardware counter library to measure the memory hierarchy performance of all the paths in the function “func”. In other words, you should report the L1, L2 and TLB cache misses for each path in the function “func”. You don’t need to  measure or report the counters for other parts of the program. Furthermore, you should optimize/de-optimize the two programs for memory hierarchy and again  use  PAPI  to verify their memory hierarchy performance.实验代写

(1)Use the PAPI library to measure the L1 cache miss,

the L2 cache miss and the TLB miss of the function “func” of the two programs. The “main” function of the two programs has already set up the initialization of the PAPI library. You only need to provide the event names in the line that is labeled with “Please add your event here.” Submit your code and measurements in your report. You should measure for both input 实验代写

(2)Transform the func function so that for one input set of your choice, the most frequently executed path in the “func” function can achieve minimum and maximum of L2 cache miss. The “func” is basically a sequence of memory accesses. You can change the order    of the memory accesses, but you cannot add or remove memory accesses to the sequence. You may also change the data struct declaration for the transformation. Note that you are required to only work on the most frequently executed path, implying that you may sacrifice other paths to achieve the goal. The most important grading criteria is WHY you do what your do. Submit   your code and measurements, together with your explanation of the transformations, i.e., why they work. (Hint: Optimize/de-optimize by avoiding/creating cache)实验代写

实验#1:硬件计数器和性能分析

问题1:节点配置文件,边缘配置文件和路径配置文件

检测程序prof.c的功能“ func”以收集节点轮廓,边缘轮廓和
函数的路径配置文件。将函数“ func”中的“ for”循环视为节点,即您
无需进入for循环即可生成路径。 “ func”功能具有多个
论点。相应的主要功能为这些功能提供了两种可能的输入集
论点。您应该对两个输入集进行性能分析。您需要提交3个版本的
程序,每个版本测量一种类型的配置文件。绘制“ func”功能的CFG
并将其包含在报告中。

问题2:练习使用硬件计数器并优化内存层次结构

PAPI硬件计数器库:PAPI库已安装在
目录/ usr。库二进制文件位于/ usr / lib中,而库头文件位于/ usr / include中。
当需要使用PAPI编译程序时,可以使用命令行:“ gcc -I /
usr / include your_program_file -L / usr / lib -lpapi”。
在此问题中,您需要使用PAPI硬件计数器库来测量内存
函数“ func”中所有路径的层次结构性能。换句话说,您应该举报
函数“ func”中的每个路径的L1,L2和TLB缓存未命中。你不需要
测量或报告程序其他部分的计数器。此外,您应该
针对内存层次优化/取消优化这两个程序,然后再次使用PAPI进行验证
它们的内存层次结构性能。实验代写
(1)使用PAPI库测量L1缓存未命中,L2缓存未命中和TLB
缺少两个程序的功能“ func”。这两个程序的“主要”功能有
已经设置了PAPI库的初始化。您只需要在以下位置提供事件名称
标有“请在此处添加您的活动”的行。在以下位置提交您的代码和度量
您的报告。您应该测量两个输入集。实验代写
(2)转换func函数,以便对于您选择的一个输入集,最大
“ func”功能中经常执行的路径可以达到L2的最小值和最大值
缓存未命中。 “ func”基本上是存储器访问的序列。您可以更改订单
的内存访问,但是您不能添加或删除序列的内存访问。你
也可能会更改转换的数据结构声明。请注意,您必须
仅在最常执行的路径上工作,这意味着您可能会牺牲其他路径来执行
实现目标。最重要的评分标准是为什么您要做什么。提交
您的代码和度量,以及对转换的解释,即原因
他们工作。 (提示:通过避免/创建缓存冲突来优化/取消优化。)

实验代写
实验代写

其他代写:algorithm代写 analysis代写 assembly代写 assignment代写 C++代写 code代写 course代写 编程代写 考试助攻 source code代写 dataset代写 金融经济统计代写 加拿大代写 jupyter notebook代写  java代写  web代写 dataset代写 北美作业代写

合作平台:essay代写 论文代写 写手招聘 英国留学生代写

 

天才代写-代写联系方式