Skip to content

Vincent-Therrien/gpu-arena

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

70 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gpu-arena

Demonstration of simple 3D graphics. A colored triangle rotates on its vertical axis in front of a black background. The corners of the triangle are red, blue, and green, and the center of the triangle are colored in shades of these colors.

A Guided Tour of GPU Programming Frameworks

Self-contained projects that show how to install GPU programming frameworks, build GPU-accelerated programs, and execute them. Click on the links in the index table below to access the readme file of each project for more information.

The projects are minimal examples, not complete tutorials! Each readme file provides references to more detailed resources. Contributions are welcome - you can enrich the current projects and even add other GPU programming frameworks!

Project Index

Click on the links in the leftmost column to access the corresponding subdirectory. Y indicates that the framework supports the application or device. N indicates that it does not support them.

Framework Applications Devices Operating Systems Shading / kernel language
Graphics General-purpose CPU Nvidia Intel AMD Apple Silicon
OpenGL Y Y (since version 4.3, 2012) N Y Y Y N Any (deprecated on Mac) GLSL
Metal Y* Y* N N N N Y Mac / iOS MSL
DirectX Y Y N Y Y Y N Windows HLSL
Vulkan Y Y (implemented with kompute) N Y Y Y N Any (deprecated on Mac) Anything that compiles to SPIR-V
WebGPU Y Y N Y Y Y Y Any WGSL
CUDA N Y N Y N N N Windows, Linux CUDA
OpenCL N Y Y Y Y Y Y Any (deprecated on Mac) OpenCL C
SYCL N Y* Y Y Y Y Y Any (CPU-only on Mac) C++ extensions
Triton N Y N Y N Y N Linux Decorated Python functions
OpenMP N Y Y Y Y Y Y Any Compiler directives
AcceleratedKernels.jl N Y Y Y Y Y Y Any Julia functions
CPU (baseline) N Y Y N N N N Any N/A
  • *: The corresponding example is not implemented in the project.

Other Frameworks

There are even more frameworks that can be used to program GPUs! Below are listed a few of them; no example is implemented in this repository, but you can follow the links to learn more about them.

GPU Projects

Some projects that use GPU programming. Don't hesitate to create a PR if you want to add any!

Additional Resources

Benchmarking

Run the Python script benchmark.py to compare how performances vary depending on the number of threads running on CPU:

# Linux
python3 benchmark.py

# OS that begins with the letter W
py benchmark.py

Visite guidée de cadres logiciels pour processeurs graphiques

Ce dépôt contient des projets sans dépendances qui montrent comment installer un cadre logiciel de programmation de GPU, comment construire des programmes accélérés par GPU, et comment les exécuter. Cliquez sur les liens dans le tableau ci-dessous pour accéder à des informations supplémentaires sur chaque projet.

Ces projets sont des exemples minimalistes et non des tutoriels complets. Les fichiers readme dans chaque sous-répertoire fournissent des ressources plus détaillées.

Indice des projets

Cadre logiciel Applications Appareils Systèmes d'exploitation Language de nuanceurs / noyaux
Graphique Calculs généraux CPU Nvidia Intel AMD Apple Silicon
OpenGL O O (depuis la version 4.3, 2012) N O O O N Tous (réprouvé sur Mac) GLSL
DirectX O O N O O O N Windows HLSL
Metal O* O* N N N N O Mac / iOS MSL
Vulkan O O (avec kompute) N O O O N Tous (réprouvé sur Mac) Tous se qui se compile vers SPIR-V
WebGPU O O N O O O O Tous WGSL
CUDA N O N O N N N Windows, Linux CUDA
OpenCL N O O O O O O Tous (réprouvé sur Mac) OpenCL C
SYCL N O* O O O O O Tous (CPU seulement sur Mac) Extensions C++
Triton N O N O N O N Linux Fonctions Pythons
OpenMP N O O O O O O Tous Directives de compilateur
AcceleratedKernels.jl N O O O O O O Tous Fonctions Julia
CPU N O O N N N N Tous N/A
  • Le signe * indique que l'exemple correspondant n'est pas inclus dans le projet.

Autres cadriciels

Encore d'autres cadriciels sont disponibles pour programmer des GPU! La liste ci-dessous en présente quelques-uns. Aucun exemple n'est implémenté pour eux dans ce dépôt, mais vous pouvez suivre les liens pour en apprendre davantage.

Projets

Quelques projets qui utilisent des GPU. N'hésitez pas à créer un PR pour en ajouter à la liste :

Ressources additionnelles

Comparaisons

Exécutez le script benchmark.py pour comparer les performances d'un programme utilisant plusieurs fils d'exécution sur CPU:

# Linux
python3 benchmark.py

# OS that begins with the letter W
py benchmark.py

About

Compare and test GPU programming frameworks

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •