Zum Inhalt springen

„Nvidia CUDA Compiler“ – Versionsunterschied

aus Wikipedia, der freien Enzyklopädie
[ungesichtete Version][gesichtete Version]
Inhalt gelöscht Inhalt hinzugefügt
WP:CITEVAR, added info to refs, ce
erstellt
Zeile 1: Zeile 1:
{{Infobox Software
{{short description|Proprietary compiler by Nvidia}}
|Name = <!-- Nur wenn vom Artikelnamen abweichend -->
{{Infobox software
| name =
|Logo =
|Screenshot = <!-- NUR BEI FREIER SOFTWARE -->
| title =
| logo = <!-- Image name is enough -->
|Beschreibung = <!-- Beschreibung des Screenshots -->
|Hersteller = [[Nvidia]]
| logo caption =
|AktuelleVersion = 12.3
| logo_size =
|Betriebssystem = [[Linux]], [[Windows]] und [[Mac OS X]]
| logo_alt =
|Kategorie = [[Compiler]]
| screenshot = <!-- Image name is enough -->
|Lizenz = [[proprietäre Software]]
| caption =
|Deutsch =
| screenshot_size =
|Website = [https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/#introduction ttps://docs.nvidia.com/cuda]
| screenshot_alt =
| collapsible =
| author = [[Nvidia]]
| developer =
| released = <!-- {{Start date and age|YYYY|MM|DD|df=yes/no}} -->
| discontinued =
| latest release version =
| latest release date = <!-- {{Start date and age|YYYY|MM|DD|df=yes/no}} -->
| latest preview version =
| latest preview date = <!-- {{Start date and age|YYYY|MM|DD|df=yes/no}} -->
| programming language =
| operating system =
| platform =
| size =
| language =
| language count = <!-- DO NOT include this parameter unless you know what it does -->
| language footnote =
| genre = [[Compiler]]
| license = [[Proprietary software]]
| website = {{URL|https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/#introduction}}
}}
}}
''' Nvidia CUDA Compiler''' ('''NVCC''') ist ein [[proprietäre Software|proprietäre]] [[Compiler]] von [[Nvidia]] für die Verwendung mit [[CUDA]]. CUDA-Code läuft sowohl auf der [[CPU]] als auch auf der [[GPU]]. NVCC trennt diese beiden Teile und sendet den Host-Code (den Teil des Codes, der auf der [[CPU]] ausgeführt wird) an einen [[C (Programmiersprache)|C]]-Compiler wie [[GNU Compiler Collection|GCC]], [[Intel C++ Compiler|ICC]] oder [[Microsoft Visual C++]] und sendet den Gerätecode (den Teil, der auf der GPU ausgeführt wird) an die GPU. Der Gerätecode wird von NVCC weiter kompiliert. NVCC basiert auf [[LLVM]].<ref>{{cite web|title=CUDA LLVM Compiler |url=https://developer.nvidia.com/cuda-llvm-compiler|publisher=NVIDIA Developer |language=en-us |access-date=Apr 6, 2016}}</ref> Laut der von Nvidia zur Verfügung gestellten Dokumentation unterstützt nvcc in Version 7.0 viele Sprachkonstrukte, die durch den [[C++11]]-Standard definiert sind, sowie einige [[C99]]-Funktionen. In Version 9.0 werden einige weitere Konstrukte aus dem [[C%2B%2B#C++14|C++14]]-Standard unterstützt.<ref>{{Cite web|url=https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html|title=CUDA C++ Programming Guide |website=NVIDIA Documentation Hub |language=en-us|access-date=2019-06-28}}</ref>


Jede Quelldatei der CUDA-Spracherweiterungen (.cu), muss mit nvcc kompiliert werden. NVCC ruft alle notwendigen Tools und Compiler wie cudacc, g++, cl, etc. auf. NVCC kann entweder C-Code (--cuda) für die Ausführung auf der CPU ausgeben, Objektdateien (.o), die dann mit anderen gelinkt werden, oder direkt [[Parallel Thread Execution|PTX]]-Code für die Ausführung auf der GPU. Eine ausführbare Datei mit CUDA-Code benötigt die CUDA-Kernbibliothek (cuda) und die CUDA-Laufzeitbibliothek (cudart).
''' Nvidia CUDA Compiler''' ('''NVCC''') is a [[proprietary software|proprietary]] [[compiler]] by [[Nvidia]] intended for use with [[CUDA]]. CUDA code runs on both the [[CPU]] and [[GPU]]. NVCC separates these two parts and sends host code (the part of code which will be run on the [[CPU]]) to a [[C (programming language)|C]] compiler like [[GNU Compiler Collection|GCC]] or [[Intel C++ Compiler]] (ICC) or [[Microsoft Visual C++]] Compiler, and sends the device code (the part which will run on the GPU) to the GPU. The device code is further compiled by NVCC. NVCC is based on [[LLVM]].<ref>{{cite web|title=CUDA LLVM Compiler |url=https://developer.nvidia.com/cuda-llvm-compiler|publisher=NVIDIA Developer |access-date=Apr 6, 2016}}</ref> According to Nvidia provided documentation, nvcc in version 7.0 supports many language constructs that are defined by the [[C++11]] standard and a few [[C99]] features as well. In version 9.0 several more constructs from the [[C++14]] standard are supported.<ref>{{Cite web|url=https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html|title=CUDA C++ Programming Guide |website=NVIDIA Documentation Hub |language=en-us|access-date=2019-06-28}}</ref>


Andere weit verbreitete Bibliotheken:
Any source file containing CUDA language extensions (.cu) must be compiled with nvcc. NVCC is a compiler driver which works by invoking all the necessary tools and compilers like cudacc, g++, cl, etc. NVCC can output either C code (CPU Code) that must then be compiled with the rest of the application using another tool or [[Parallel Thread Execution|PTX]] or object code directly. An executable with CUDA code requires: the CUDA core library (cuda) and the CUDA runtime library (cudart).
* CUBLAS: [[BLAS]]-Implementierung
* CUFFT: [[Schnelle Fourier-Transformation|FFT]]-Implementierung
* CUDPP (Datenparallele Primitive): Reduktion, Scannen, Sortieren.
* Thrust: Reduktion, Scannen, Sortieren.
== Einzelnachweise ==
<references />


{{SORTIERUNG:Nvidia CUDA Compiler}}
Other widely used libraries:
[[Kategorie:C (Programmiersprache)]]
* CUBLAS: BLAS implementation
[[Kategorie:C++]]
* CUFFT: FFT implementation
[[Kategorie:Linux-Software]]
* CUDPP (Data Parallel Primitives): Reduction, Scan, Sort.
[[Kategorie:Unix-Software]]
* Thrust: Reduction, Scan, Sort.
[[Kategorie:MacOS-Software]]

[[Kategorie:Nvidia]]
== See also ==
* [[OpenCL]]
* [[Heterogeneous System Architecture]]
* [[CUDA binary]] (cubin) – a type of fat binary

== References ==
{{Reflist}}
# David B. Kirk, and Wen-mei W. Hwu. Programming massively parallel processors: a hands-on approach. Morgan Kaufmann, 2010.
# {{Cite web |title=NVIDIA CUDA Compiler Driver NVCC |url=https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/ |url-status=live |archive-url=https://web.archive.org/web/20231013194328/https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/ |archive-date=Oct 13, 2023 |website=NVIDIA Documentation Hub}}
# {{Cite web |title=CUDPP |url=http://gpgpu.org/developer/cudpp |url-status=dead |archive-url=https://web.archive.org/web/20181117222643/http://gpgpu.org/developer/cudpp |archive-date=Nov 17, 2018 |website=GPGPU}}

[[Category:Nvidia software]]
[[Category:Compilers]]
{{computer-stub}}

Version vom 6. Januar 2024, 19:19 Uhr

Nvidia CUDA Compiler
Basisdaten

Entwickler Nvidia
Aktuelle Version 12.3
Betriebssystem Linux, Windows und Mac OS X
Kategorie Compiler
Lizenz proprietäre Software
ttps://docs.nvidia.com/cuda

Nvidia CUDA Compiler (NVCC) ist ein proprietäre Compiler von Nvidia für die Verwendung mit CUDA. CUDA-Code läuft sowohl auf der CPU als auch auf der GPU. NVCC trennt diese beiden Teile und sendet den Host-Code (den Teil des Codes, der auf der CPU ausgeführt wird) an einen C-Compiler wie GCC, ICC oder Microsoft Visual C++ und sendet den Gerätecode (den Teil, der auf der GPU ausgeführt wird) an die GPU. Der Gerätecode wird von NVCC weiter kompiliert. NVCC basiert auf LLVM.[1] Laut der von Nvidia zur Verfügung gestellten Dokumentation unterstützt nvcc in Version 7.0 viele Sprachkonstrukte, die durch den C++11-Standard definiert sind, sowie einige C99-Funktionen. In Version 9.0 werden einige weitere Konstrukte aus dem C++14-Standard unterstützt.[2]

Jede Quelldatei der CUDA-Spracherweiterungen (.cu), muss mit nvcc kompiliert werden. NVCC ruft alle notwendigen Tools und Compiler wie cudacc, g++, cl, etc. auf. NVCC kann entweder C-Code (--cuda) für die Ausführung auf der CPU ausgeben, Objektdateien (.o), die dann mit anderen gelinkt werden, oder direkt PTX-Code für die Ausführung auf der GPU. Eine ausführbare Datei mit CUDA-Code benötigt die CUDA-Kernbibliothek (cuda) und die CUDA-Laufzeitbibliothek (cudart).

Andere weit verbreitete Bibliotheken:

  • CUBLAS: BLAS-Implementierung
  • CUFFT: FFT-Implementierung
  • CUDPP (Datenparallele Primitive): Reduktion, Scannen, Sortieren.
  • Thrust: Reduktion, Scannen, Sortieren.

Einzelnachweise

  1. CUDA LLVM Compiler. NVIDIA Developer, abgerufen am 6. April 2016 (amerikanisches Englisch).
  2. CUDA C++ Programming Guide. In: NVIDIA Documentation Hub. Abgerufen am 28. Juni 2019 (amerikanisches Englisch).