Git Product home page Git Product logo

pca-exp-1-sum-array-gpu-ay-23-24's Introduction

PCA: EXP-1 SUM ARRAY GPU

ENTER YOUR NAME

ENTER YOUR REGISTER NO

EX. NO

DATE

SUM ARRAY ON HOST AND DEVICE

PCA-GPU-based-vector-summation.-Explore-the-differences. i) Using the program sumArraysOnGPU-timer.cu, set the block.x = 1023. Recompile and run it. Compare the result with the execution configuration of block.x = 1024. Try to explain the difference and the reason.

ii) Refer to sumArraysOnGPU-timer.cu, and let block.x = 256. Make a new kernel to let each thread handle two elements. Compare the results with other execution confi gurations.

AIM:

To perform vector addition on host and device.

EQUIPMENTS REQUIRED:

Hardware โ€“ PCs with NVIDIA GPU & CUDA NVCC Google Colab with NVCC Compiler

PROCEDURE:

  1. Initialize the device and set the device properties.
  2. Allocate memory on the host for input and output arrays.
  3. Initialize input arrays with random values on the host.
  4. Allocate memory on the device for input and output arrays, and copy input data from host to device.
  5. Launch a CUDA kernel to perform vector addition on the device.
  6. Copy output data from the device to the host and verify the results against the host's sequential vector addition. Free memory on the host and the device.

PROGRAM:

TYPE YOUR CODE HERE

OUTPUT:

SHOW YOUR OUTPUT HERE

RESULT:

Thus, Implementation of sum arrays on host and device is done in nvcc cuda using random number.

pca-exp-1-sum-array-gpu-ay-23-24's People

Contributors

aswini-j avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.