Samples for CUDA Developers which demonstrates features in CUDA Toolkit
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
shawnz a45fd3bd7c Bug 5199167: Fix the includes issue for 5_Domain_Specific\simpleD3D12 3 months ago
..
CMakeLists.txt Update all sample CMakeLists.txt to include ENABLE_CUDA_DEBUG flag to enable cuda-gdb 4 months ago
DX12CudaSample.cpp Apply consistent code formatting across the repo. Add clang-format and pre-commit hooks. 3 months ago
DX12CudaSample.h Bug 5199167: Fix the includes issue for 5_Domain_Specific\simpleD3D12 3 months ago
DXSampleHelper.h Bug 5199167: Fix the includes issue for 5_Domain_Specific\simpleD3D12 3 months ago
Main.cpp Apply consistent code formatting across the repo. Add clang-format and pre-commit hooks. 3 months ago
README.md Apply consistent code formatting across the repo. Add clang-format and pre-commit hooks. 3 months ago
ShaderStructs.h Apply consistent code formatting across the repo. Add clang-format and pre-commit hooks. 3 months ago
Win32Application.cpp Apply consistent code formatting across the repo. Add clang-format and pre-commit hooks. 3 months ago
Win32Application.h Apply consistent code formatting across the repo. Add clang-format and pre-commit hooks. 3 months ago
d3dx12.h Apply consistent code formatting across the repo. Add clang-format and pre-commit hooks. 3 months ago
shaders.hlsl add and update samples for CUDA 11.6 4 years ago
simpleD3D12.cpp Apply consistent code formatting across the repo. Add clang-format and pre-commit hooks. 3 months ago
simpleD3D12.h Bug 5199167: Fix the includes issue for 5_Domain_Specific\simpleD3D12 3 months ago
sinewave_cuda.cu Apply consistent code formatting across the repo. Add clang-format and pre-commit hooks. 3 months ago
stdafx.cpp add and update samples for CUDA 11.6 4 years ago
stdafx.h Apply consistent code formatting across the repo. Add clang-format and pre-commit hooks. 3 months ago

README.md

simpleD3D12 - Simple D3D12 CUDA Interop

Description

A program which demonstrates Direct3D12 interoperability with CUDA. The program creates a sinewave in DX12 vertex buffer which is created using CUDA kernels. DX12 and CUDA synchronizes using DirectX12 Fences. Direct3D then renders the results on the screen. A DirectX12 Capable NVIDIA GPU is required on Windows10 or higher OS.

Key Concepts

Graphics Interop, CUDA DX12 Interop, Image Processing

Supported SM Architectures

SM 5.0 SM 5.2 SM 5.3 SM 6.0 SM 6.1 SM 7.0 SM 7.2 SM 7.5 SM 8.0 SM 8.6 SM 8.7 SM 8.9 SM 9.0

Supported OSes

Windows

Supported CPU Architecture

x86_64

CUDA APIs involved

CUDA Runtime API

cudaWaitExternalSemaphoresAsync, cudaExternalMemoryGetMappedBuffer, cudaImportExternalSemaphore, cudaFree, cudaSetDevice, cudaSignalExternalSemaphoresAsync, cudaGetDeviceProperties, cudaStreamSynchronize, cudaDestroyExternalMemory, cudaStreamCreate, cudaImportExternalMemory, cudaGetDeviceCount, cudaDestroyExternalSemaphore

Dependencies needed to build/run

DirectX12

Prerequisites

Download and install the CUDA Toolkit 12.5 for your corresponding platform. Make sure the dependencies mentioned in Dependencies section above are installed.

References (for more details)