Coder Social home page Coder Social logo

opencl-benchmark's Introduction

OpenCL Performance Test

This is a simple test to compare the performance between CPU and GPU computation.

There are two program cpu.c and gpu.c, both of them will calculate the summary of numbers from 0 to 100 million. In the end, the program will display the elapsed time.

How to run

First, you need to compile the programs. This method only works on Apple platform (macOS) for now.

Type the following command to your terminal:

make

When the compiling finished, you will have 2 binary files: cpu and gpu.

Run test on CPU:

./cpu

Run test on GPU:

./gpu

What's your test result?

iMac Late 2015

I ran the test on an iMac Late 2015, which has:

CPU: 1.6 GHz Intel Core i5
GPU: 1535 MB Intel HD Graphics 6000

The runtime result is:

CPU: 0.315500ms
GPU: 0.000862ms

MacBook Pro Mid 2015

Another test on MacBook Pro Mid 2015:

CPU: 2.5 GHz Intel Core i7
GPU: 1536 MB Intel Iris Pro

Runtime result:

CPU: 0.216143ms
GPU: 0.000545ms

MacBook Pro Late 2013

On MacBook Pro Late 2013:

CPU: 2.4 GHz Intel Core i5
GPU: 1536 Intel Iris

Runtime result:

CPU: 0.291636ms
GPU: 0.001999ms

MacBook Pro Mid 2012

On MacBook Pro Mid 2012:

CPU: 2.5 GHz Intel Core i5
GPU: 1536 MB Intel HD Graphics 4000

Runtime result:

CPU: 0.284128ms
GPU: 0.001589ms

opencl-benchmark's People

Contributors

huytd avatar marmistrz avatar

Watchers

James Cloos 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.