Giter Site home page Giter Site logo

daelsepara / hipmandelbrot Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 1.0 154 KB

GPU Implementation of Mandelbrot Fractal Generator with Benchmarking

License: GNU General Public License v3.0

C 100.00%
amd cuda fractal gpu gpu-compute gpu-computing hip mandelbrot parallel-computing rocm sdk

hipmandelbrot's Introduction

HIP Mandelbrot

GPU Implementation of Mandelbrot Fractal Generator with Benchmarking using AMD HIP SDK.

Computes for the Mandelbrot set in the complex plane bounded by the rectangular corners (-2.0, -2.0) to (2.0, 2.0).

Usage

To use:

[Command Prompt] HIPMandelbrot.exe [WIDTH] [HEIGHT]

or

[Command Prompt] HIPMandelbrot.exe [N]

Sample Run

[Command Prompt] HIPMandelbrot.exe 32768 32768

Device: AMD Radeon RX 7800 XT

Estimated GPU RAM requirements: 4294967296 bytes
Total GPU RAM: 17163091968 bytes
Program GPU RAM limit: 8589934592 bytes
Size of int: 4 bytes

generating mandelbrot set using GPU ...
GPU elapsed time: 1903.98 ms
generating mandelbrot set using CPU ...
CPU elapsed time: 61218.6 ms

32.153x speedup, diff: 288

Benchmarks

N GPU (ms) CPU (ms) speed factor status
16 1.4344 0.024 0.0199 slower
32 1.5457 0.0865 0.0559617002 slower
64 1.5693 0.3231 0.2058879755 slower
128 1.5188 1.1664 0.7679747169 slower
256 1.9443 4.247 2.184333693 faster
512 2.6105 15.6552 5.997012067 faster
1024 3.4076 63.2497 18.56136284 faster
2048 8.6175 243.014 28.20005802 faster
4096 28.2254 962.061 34.08493768 faster
8192 124.929 3839.13 30.73049492 faster
16384 483.53 15327.6 31.69937749 faster
32768 1903.98 61218.6 32.15296379 faster

where:

  • N - length of the square image's side (in pixels)
  • speed factor - ratio between CPU and GPU elapsed times (CPU/GPU)

Test Machine

  • CPU: Ryzen 5700x (8 core/16 threads)
  • 32GB 3200MT/s CL16 DDR4
  • Gigabyte B550I AORUS PRO AX rev 1.2
  • GPU: Sapphire Pulse 7800xt 16GB GDDR6

Graphs

Elapsed Time

Elapsed Time

Speed Comparison (and baselines)

Speed Comparison

To Do

  • PNG Image Output
  • User defined parameters
  • Implement other fractal generators

hipmandelbrot's People

Contributors

daelsepara avatar

Stargazers

Jianbing Chen avatar

Watchers

 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.