Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Vector Performance (40 marks) Consider the following code fragment: v1,rx v2,ry // load vector x // load vector y mulvs.d v3,v1,f addvv.d v4,v2,v3 mulvs.d

image text in transcribed

1. Vector Performance (40 marks) Consider the following code fragment: v1,rx v2,ry // load vector x // load vector y mulvs.d v3,v1,f addvv.d v4,v2,v3 mulvs.d v5,v2,f2 sV sV // z3b * y // store z2 as vector y // store z3 as vector x v4,ry v5,rx Make the following assumptions: - this is a four-lane vector processor-this affects the running time of vector instructions, according to our formula - there are two copies of each arithmetic vector functional unit and two copies of the vector load-store functional unit---this affects the number of vector instructions that can run in parallel in a gang - a vector store completes as soon as the last element is sent to memory - start-up penalties of functional units are: l/s-12, add-6, mul- 7 - the vector length is 256 a) In the absence of vector chaining, determine the execution time of this code fragment by drawing the timing diagram. Indicate starting time, first result, and last result for each gang. Hint: draw the flow-dependence graph first. This is the bad way we mocked in class; the better way works directly with start-up penalties and 'n'.> b) In the presence of vector chaining, determine the execution time of this code fragment by drawing the timing diagram. Indicate starting time, first result, and last result for each gang. 1. Vector Performance (40 marks) Consider the following code fragment: v1,rx v2,ry // load vector x // load vector y mulvs.d v3,v1,f addvv.d v4,v2,v3 mulvs.d v5,v2,f2 sV sV // z3b * y // store z2 as vector y // store z3 as vector x v4,ry v5,rx Make the following assumptions: - this is a four-lane vector processor-this affects the running time of vector instructions, according to our formula - there are two copies of each arithmetic vector functional unit and two copies of the vector load-store functional unit---this affects the number of vector instructions that can run in parallel in a gang - a vector store completes as soon as the last element is sent to memory - start-up penalties of functional units are: l/s-12, add-6, mul- 7 - the vector length is 256 a) In the absence of vector chaining, determine the execution time of this code fragment by drawing the timing diagram. Indicate starting time, first result, and last result for each gang. Hint: draw the flow-dependence graph first. This is the bad way we mocked in class; the better way works directly with start-up penalties and 'n'.> b) In the presence of vector chaining, determine the execution time of this code fragment by drawing the timing diagram. Indicate starting time, first result, and last result for each gang.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions