Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

Part 1:

Description

You are given C code for an application that draws dragon curve fractal producing output as you see in the picture on the left. Your task (if you choose to accept) is to transfer curve calculation section of the provided application to OpenCL kernel and to investigate kernel execution times with input depths of 5, 10 and 12.

To build the application use the provided Makefile. The application can be launched with input depth of 10 as follows:

~$ ./dragon 10 > output.pnm

Deliverables

You are expected to produce the OpenCL kernel and the application driver. In addition a document detailing the following points is expected:

1. Understanding of the algorithm

2. Explanation for the chosen kernel implementation

3. Analysis of the measurements made. An explanation is required

You are allowed to use the matrix-matrix multiplication example as the starting base.

Part2

Description

In this assignment, you will experiment with how to accelerate application kernel using GPU architecture and explore GPU design space with a GPU simulation environment. To complete this homework, you need to download GPGPU-Sim (http://www.gpgpu-sim.org/). GPGPU-Sim is a GPU simulator that provides a model for detailed studies of GPU architecture. It supports GPU software written using either CUDA or Open CL. You need access to Linux-based systems in order to run the simulator. The studied application is the kernel function for bitcoin mining.

It is divided into the following steps. Please submit your Open CL code and a report that documents what you did, results and analysis.

Part A: Open CL. Convert bitcoin kernel function into Open CL. Take the bitcoin mining kernel function (written in C) and convert it to Open CL. The bitcoin kernel function performs two hashes (SHA256) and tests the output. The mining kernel can be accelerated using GPU streaming processors and parallel threads.

Part B: GPGPU-Sim. Test the developed bitcoin mining kernel using GPGPU-Sim. Use the GPU configuration below.

Number of Shader Cores

28

Warp Size

32

SIMD Pipeline Width

8

Number of Threads/Core

1024

Number of CTAs /Core

8

Number of Registers /Core

16384

Shared Memory Size /Core (KB)

16 KB

Constant Cache Size /Core

8KB (2 way set assoc, 64B lines LRU)

Texture Cache Size /Core

64KB (2 way set assoc. 64B lines LRU)

Number of Memory Channels

8

L1 Cache

None

L2 Cache

None

Warp Scheduling Policy

Round Robin among ready warps

Report performance for the following:
- Classification of bitcoin mining kernel's instruction type (percentage of each dynamic instruction types)
- Breakdown of memory operations (shared, constant, tex, local, global)
- Warp occupancy (number of active threads in an issued warp)
- Performance of shared memory and constant cache
- IPC for bitcoin mining kernel (instructions per cycle)

Part C: Code Optimization. Optimize the bitcoin mining kernel using loop unrolling and compare GPU performance. Does the optimization improve Warp occupancy, IPC, or memory performance?

Part D: GPU Design Space Exploration. The next exercise explores the design space of GPU architecture for accelerating the bitcoin mining kernel.

Will increasing the number of threads per core improve bitcoin mining performance?

Experiment and compare the performance using different number of threads/core.

Number of Shader Cores

28

Warp Size

32

SIMD Pipeline Width

8

Number of Threads/Core

1024/1536/2048

Number of CTAs /Core

8

Number of Registers /Core

16384

Shared Memory Size /Core (KB)

16 KB

Constant Cache Size /Core

8KB (2 way set assoc, 64B lines LRU)

Texture Cache Size /Core

64KB (2 way set assoc. 64B lines LRU)

Number of Memory Channels

8

L1 Cache

None

L2 Cache

None

Warp Scheduling Policy

Round Robin among ready warps

Will increasing the number of registers per core improve bitcoin mining performance?

Number of Shader Cores

28

Warp Size

32

SIMD Pipeline Width

8

Number of Threads/Core

1024

Number of CTAs /Core

8

Number of Registers /Core

16384/24576/32768

Shared Memory Size /Core (KB)

16 KB

Constant Cache Size /Core

8KB (2 way set assoc, 64B lines LRU)

Texture Cache Size /Core

64KB (2 way set assoc. 64B lines LRU)

Number of Memory Channels

8

L1 Cache

None

L2 Cache

None

Warp Scheduling Policy

Round Robin among ready warps

Experiment and compare the performance using different number of registers /core.

Will increasing shared memory size or texture cache size improve bitcoin mining performance? Answer the question with performance measurement.

Assume you want to maximize bitcoin mining performance by adding new features to the GPU. Bitcoin mining kernel computes SHA-256 hash calculations. SHA-256 algorithm utilizes a 32-bit integer right rotate operation. Right rotation of n = 11100101 by 3 makes n = 10111100 (Right shifted by 3 and last 3 bits are put back in first ) if n is stored using 8 bits. If n is stored using 16 bits or 32 bits then right rotation of n (000...11100101) by 3 becomes 101000..0011100.

As a GPU designer, you decide to add a funnel shifter to accelerate the integer shift operations. The funnel shifter is pipelined (ptx_opcode_latency = 1, and ptx_opcode_initiation = 1). For developers, a 64-bit "funnel shift" instruction that may be accessed with the following intrinsics:

funnelshift_lc(): returns most significant 32 bits of a left funnel shift.

funnelshift_rc(): returns least significant 32 bits of a right funnel shift.

These intrinsics are implemented as inline device functions (using inline PTX assembler). By default, the least significant 5 bits of the shift count are masked off; the _lc and _rc intrinsics clamp the shift value to the range 0..32.

 

INTRINSIC

 

DESCRIPTION

 

    funnelshift_l(hi, lo, sh)

 

Concatenates [hi:lo] into a 64-bit quantity, shifts it left by (sh&31)bits, and returns the most significant 32 bits

 

    funnelshift_lc(hi, lo, sh)

 

Concatenates [hi:lo] into a 64-bit quantity, shifts it left by min(sh,32) bits, and returns the most significant 32 bits

 

    funnelshift_r(hi, lo, sh)

 

Concatenates [hi:lo] into a 64-bit quantity, shifts it right by (sh&31) bits, and returns the least significant 32 bits

 

    funnelshift_rc(hi, lo, sh)

 

Concatenates [hi:lo] into a 64-bit quantity, shifts it right by min(sh,32) bits, and returns the least significant 32 bits

To complete this question, you need to add extension to GPGPU-sim to take into account this new support for shift operations and simulate its performance (assume one funnel shift unit per SP).

Re-write the bitcoin mining kernel using funnel shift intrinsics and measure its performance using the modified GPGPU-sim with funnel shift support. Can bitcoin mining performance be improved significantly using the dedicated hardware support for integer shift operations? Answer the question using simulated performance measures.

Please submit your GPGPU-sim code, Open CL bitcoin mining kernel using funnel shift intrinsic, and a report that documents design of your extension to GPGPU-sim, performance results, and analysis.


Attachment:- hwDocs.rar

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M91581882
  • Price:- $120

Guranteed 48 Hours Delivery, In Price:- $120

Have any Question?


Related Questions in Computer Engineering

Could you please tell me how to solve the following stats

Could you please tell me how to solve the following stats questions? "Yearly return on common stocks are normally distributed with a mean of 12.4 percent and a standard deviation of 20.6 percent. You are allowed to use E ...

Computer sciencewhat is required of an organization to

Computer Science What is required of an organization, to implement and maintain IT Governance? What outside resources are available to assist technology managers in the implementation and maintenance process?

One state lottery has 1100 prizes of 1 145 prizes of 10 20

One state lottery has 1,100 prizes of $1; 145 prizes of $10; 20 prizes of $75; 5 prizes of $285; 2 prizes of $1,080; and 1 prize of $2,300. Assume that 24,000 lottery tickets are issued and sold for $1. 1)  What is the l ...

A mail order supplier advertises same-day service on every

A mail order supplier advertises same-day service on every order. Recently, the movement of orders has not gone as planned. The director of customer service has completely redone the method of order handling. The goal of ...

Please help with anbspfunctionnbspcodesymbol to convert

Please help with a function  codeSymbol , to convert each mark to a symbol (A, B, C, D, E, F) and a code (7,6,5,4,3,2,1) according to the table below. And call it in the main function. Use the table below to determine th ...

Answer the following question a suppose alice shares a

Answer the following Question : a. Suppose Alice shares a secret block cipher key, K_AB with Bob, and a different secret block cipher key, K_AC with Charlie. Describe a method for Alice to encrypt an m-block message such ...

Question suppose we have a rectangle class that includes

Question : Suppose we have a Rectangle class that includes length and width attributes of type int, both set by the constructor. Create a compareTo method for this class so that rectangle objects are ordered based on the ...

Question sms imessage and whatsapp are all smartphone

Question : SMS, iMessage, and WhatsApp are all smartphone real-time messaging systems. After doing some research on the Internet, for each of these systems write one paragraph about the protocols they use. Then write a p ...

Why regulated industries should be required to follow

Why regulated industries should be required to follow security standards. Provide 2 examples of industries that would fall under this category.

Define risk and explain why this concept is important to

Define risk and explain why this concept is important to small business managers.

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As