Updating samples for 12.0

This commit is contained in:
Rob Nertney
2022-12-08 20:19:55 +00:00
parent 81992093d2
commit 2b689228b7
1134 changed files with 150249 additions and 3144 deletions

View File

@@ -38,7 +38,7 @@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
<Import Project="$(CUDAPropsPath)\CUDA 11.8.props" />
<Import Project="$(CUDAPropsPath)\CUDA 12.0.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets">
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
@@ -67,7 +67,7 @@
<OutputFile>$(OutDir)/FilterBorderControlNPP.exe</OutputFile>
</Link>
<CudaCompile>
<CodeGeneration>compute_35,compute_35;</CodeGeneration>
<CodeGeneration>compute_50,compute_50;</CodeGeneration>
<AdditionalOptions>-Xcompiler "/wd 4819" --threads 0 </AdditionalOptions>
<Include>./;../../../Common</Include>
<Defines>WIN32</Defines>
@@ -117,6 +117,6 @@
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="$(CUDAPropsPath)\CUDA 11.8.targets" />
<Import Project="$(CUDAPropsPath)\CUDA 12.0.targets" />
</ImportGroup>
</Project>

View File

@@ -34,7 +34,7 @@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
<Import Project="$(CUDAPropsPath)\CUDA 11.8.props" />
<Import Project="$(CUDAPropsPath)\CUDA 12.0.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets">
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
@@ -63,7 +63,7 @@
<OutputFile>$(OutDir)/FilterBorderControlNPP.exe</OutputFile>
</Link>
<CudaCompile>
<CodeGeneration>compute_35,compute_35;</CodeGeneration>
<CodeGeneration>compute_50,compute_50;</CodeGeneration>
<AdditionalOptions>-Xcompiler "/wd 4819" --threads 0 </AdditionalOptions>
<Include>./;../../../Common</Include>
<Defines>WIN32</Defines>
@@ -113,6 +113,6 @@
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="$(CUDAPropsPath)\CUDA 11.8.targets" />
<Import Project="$(CUDAPropsPath)\CUDA 12.0.targets" />
</ImportGroup>
</Project>

View File

@@ -34,7 +34,7 @@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
<Import Project="$(CUDAPropsPath)\CUDA 11.8.props" />
<Import Project="$(CUDAPropsPath)\CUDA 12.0.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets">
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
@@ -63,7 +63,7 @@
<OutputFile>$(OutDir)/FilterBorderControlNPP.exe</OutputFile>
</Link>
<CudaCompile>
<CodeGeneration>compute_35,compute_35;</CodeGeneration>
<CodeGeneration>compute_50,compute_50;</CodeGeneration>
<AdditionalOptions>-Xcompiler "/wd 4819" --threads 0 </AdditionalOptions>
<Include>./;../../../Common</Include>
<Defines>WIN32</Defines>
@@ -113,6 +113,6 @@
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="$(CUDAPropsPath)\CUDA 11.8.targets" />
<Import Project="$(CUDAPropsPath)\CUDA 12.0.targets" />
</ImportGroup>
</Project>

View File

@@ -295,8 +295,8 @@ ifeq ($(TARGET_ARCH),$(filter $(TARGET_ARCH),armv7l aarch64 sbsa))
# Generate PTX code from SM 53
GENCODE_FLAGS += -gencode arch=compute_53,code=compute_53
else
# Generate PTX code from SM 35
GENCODE_FLAGS += -gencode arch=compute_35,code=compute_35
# Generate PTX code from SM 50
GENCODE_FLAGS += -gencode arch=compute_50,code=compute_50
endif
endif

View File

@@ -55,8 +55,6 @@
<scope>2:Image Processing</scope>
<scope>2:Computer Vision</scope>
</scopes>
<sm-arch>sm35</sm-arch>
<sm-arch>sm37</sm-arch>
<sm-arch>sm50</sm-arch>
<sm-arch>sm52</sm-arch>
<sm-arch>sm53</sm-arch>

View File

@@ -10,7 +10,7 @@ Performance Strategies, Image Processing, NPP Library
## Supported SM Architectures
[SM 3.5 ](https://developer.nvidia.com/cuda-gpus) [SM 3.7 ](https://developer.nvidia.com/cuda-gpus) [SM 5.0 ](https://developer.nvidia.com/cuda-gpus) [SM 5.2 ](https://developer.nvidia.com/cuda-gpus) [SM 5.3 ](https://developer.nvidia.com/cuda-gpus) [SM 6.0 ](https://developer.nvidia.com/cuda-gpus) [SM 6.1 ](https://developer.nvidia.com/cuda-gpus) [SM 7.0 ](https://developer.nvidia.com/cuda-gpus) [SM 7.2 ](https://developer.nvidia.com/cuda-gpus) [SM 7.5 ](https://developer.nvidia.com/cuda-gpus) [SM 8.0 ](https://developer.nvidia.com/cuda-gpus) [SM 8.6 ](https://developer.nvidia.com/cuda-gpus) [SM 8.7 ](https://developer.nvidia.com/cuda-gpus) [SM 9.0 ](https://developer.nvidia.com/cuda-gpus)
[SM 5.0 ](https://developer.nvidia.com/cuda-gpus) [SM 5.2 ](https://developer.nvidia.com/cuda-gpus) [SM 5.3 ](https://developer.nvidia.com/cuda-gpus) [SM 6.0 ](https://developer.nvidia.com/cuda-gpus) [SM 6.1 ](https://developer.nvidia.com/cuda-gpus) [SM 7.0 ](https://developer.nvidia.com/cuda-gpus) [SM 7.2 ](https://developer.nvidia.com/cuda-gpus) [SM 7.5 ](https://developer.nvidia.com/cuda-gpus) [SM 8.0 ](https://developer.nvidia.com/cuda-gpus) [SM 8.6 ](https://developer.nvidia.com/cuda-gpus) [SM 8.7 ](https://developer.nvidia.com/cuda-gpus) [SM 9.0 ](https://developer.nvidia.com/cuda-gpus)
## Supported OSes
@@ -30,7 +30,7 @@ cudaRuntimeGetVersion, cudaDeviceReset, cudaSetDevice, cudaGetDeviceCount, cudaD
## Prerequisites
Download and install the [CUDA Toolkit 11.8](https://developer.nvidia.com/cuda-downloads) for your corresponding platform.
Download and install the [CUDA Toolkit 12.0](https://developer.nvidia.com/cuda-downloads) for your corresponding platform.
Make sure the dependencies mentioned in [Dependencies]() section above are installed.
## Build and Run

View File

@@ -287,8 +287,8 @@ ifeq ($(TARGET_ARCH),$(filter $(TARGET_ARCH),armv7l aarch64 sbsa))
# Generate PTX code from SM 53
GENCODE_FLAGS += -gencode arch=compute_53,code=compute_53
else
# Generate PTX code from SM 35
GENCODE_FLAGS += -gencode arch=compute_35,code=compute_35
# Generate PTX code from SM 50
GENCODE_FLAGS += -gencode arch=compute_50,code=compute_50
endif
endif

View File

@@ -38,7 +38,7 @@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
<Import Project="$(CUDAPropsPath)\CUDA 11.8.props" />
<Import Project="$(CUDAPropsPath)\CUDA 12.0.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets">
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
@@ -67,7 +67,7 @@
<OutputFile>$(OutDir)/MersenneTwisterGP11213.exe</OutputFile>
</Link>
<CudaCompile>
<CodeGeneration>compute_35,compute_35;</CodeGeneration>
<CodeGeneration>compute_50,compute_50;</CodeGeneration>
<AdditionalOptions>-Xcompiler "/wd 4819" --threads 0 </AdditionalOptions>
<Include>./;../../../Common</Include>
<Defines>WIN32</Defines>
@@ -107,6 +107,6 @@
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="$(CUDAPropsPath)\CUDA 11.8.targets" />
<Import Project="$(CUDAPropsPath)\CUDA 12.0.targets" />
</ImportGroup>
</Project>

View File

@@ -34,7 +34,7 @@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
<Import Project="$(CUDAPropsPath)\CUDA 11.8.props" />
<Import Project="$(CUDAPropsPath)\CUDA 12.0.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets">
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
@@ -63,7 +63,7 @@
<OutputFile>$(OutDir)/MersenneTwisterGP11213.exe</OutputFile>
</Link>
<CudaCompile>
<CodeGeneration>compute_35,compute_35;</CodeGeneration>
<CodeGeneration>compute_50,compute_50;</CodeGeneration>
<AdditionalOptions>-Xcompiler "/wd 4819" --threads 0 </AdditionalOptions>
<Include>./;../../../Common</Include>
<Defines>WIN32</Defines>
@@ -103,6 +103,6 @@
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="$(CUDAPropsPath)\CUDA 11.8.targets" />
<Import Project="$(CUDAPropsPath)\CUDA 12.0.targets" />
</ImportGroup>
</Project>

View File

@@ -34,7 +34,7 @@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
<Import Project="$(CUDAPropsPath)\CUDA 11.8.props" />
<Import Project="$(CUDAPropsPath)\CUDA 12.0.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets">
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
@@ -63,7 +63,7 @@
<OutputFile>$(OutDir)/MersenneTwisterGP11213.exe</OutputFile>
</Link>
<CudaCompile>
<CodeGeneration>compute_35,compute_35;</CodeGeneration>
<CodeGeneration>compute_50,compute_50;</CodeGeneration>
<AdditionalOptions>-Xcompiler "/wd 4819" --threads 0 </AdditionalOptions>
<Include>./;../../../Common</Include>
<Defines>WIN32</Defines>
@@ -103,6 +103,6 @@
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="$(CUDAPropsPath)\CUDA 11.8.targets" />
<Import Project="$(CUDAPropsPath)\CUDA 12.0.targets" />
</ImportGroup>
</Project>

View File

@@ -45,8 +45,6 @@
<scopes>
<scope>1:CUDA Advanced Topics</scope>
</scopes>
<sm-arch>sm35</sm-arch>
<sm-arch>sm37</sm-arch>
<sm-arch>sm50</sm-arch>
<sm-arch>sm52</sm-arch>
<sm-arch>sm53</sm-arch>

View File

@@ -10,7 +10,7 @@ CURAND Library
## Supported SM Architectures
[SM 3.5 ](https://developer.nvidia.com/cuda-gpus) [SM 3.7 ](https://developer.nvidia.com/cuda-gpus) [SM 5.0 ](https://developer.nvidia.com/cuda-gpus) [SM 5.2 ](https://developer.nvidia.com/cuda-gpus) [SM 5.3 ](https://developer.nvidia.com/cuda-gpus) [SM 6.0 ](https://developer.nvidia.com/cuda-gpus) [SM 6.1 ](https://developer.nvidia.com/cuda-gpus) [SM 7.0 ](https://developer.nvidia.com/cuda-gpus) [SM 7.2 ](https://developer.nvidia.com/cuda-gpus) [SM 7.5 ](https://developer.nvidia.com/cuda-gpus) [SM 8.0 ](https://developer.nvidia.com/cuda-gpus) [SM 8.6 ](https://developer.nvidia.com/cuda-gpus) [SM 8.7 ](https://developer.nvidia.com/cuda-gpus) [SM 9.0 ](https://developer.nvidia.com/cuda-gpus)
[SM 5.0 ](https://developer.nvidia.com/cuda-gpus) [SM 5.2 ](https://developer.nvidia.com/cuda-gpus) [SM 5.3 ](https://developer.nvidia.com/cuda-gpus) [SM 6.0 ](https://developer.nvidia.com/cuda-gpus) [SM 6.1 ](https://developer.nvidia.com/cuda-gpus) [SM 7.0 ](https://developer.nvidia.com/cuda-gpus) [SM 7.2 ](https://developer.nvidia.com/cuda-gpus) [SM 7.5 ](https://developer.nvidia.com/cuda-gpus) [SM 8.0 ](https://developer.nvidia.com/cuda-gpus) [SM 8.6 ](https://developer.nvidia.com/cuda-gpus) [SM 8.7 ](https://developer.nvidia.com/cuda-gpus) [SM 9.0 ](https://developer.nvidia.com/cuda-gpus)
## Supported OSes
@@ -30,7 +30,7 @@ cudaStreamCreateWithFlags, cudaStreamDestroy, cudaFree, cudaMallocHost, cudaFree
## Prerequisites
Download and install the [CUDA Toolkit 11.8](https://developer.nvidia.com/cuda-downloads) for your corresponding platform.
Download and install the [CUDA Toolkit 12.0](https://developer.nvidia.com/cuda-downloads) for your corresponding platform.
Make sure the dependencies mentioned in [Dependencies]() section above are installed.
## Build and Run

View File

@@ -287,8 +287,8 @@ ifeq ($(TARGET_ARCH),$(filter $(TARGET_ARCH),armv7l aarch64 sbsa))
# Generate PTX code from SM 53
GENCODE_FLAGS += -gencode arch=compute_53,code=compute_53
else
# Generate PTX code from SM 35
GENCODE_FLAGS += -gencode arch=compute_35,code=compute_35
# Generate PTX code from SM 50
GENCODE_FLAGS += -gencode arch=compute_50,code=compute_50
endif
endif

View File

@@ -45,8 +45,6 @@
<scope>1:CUDA Basic Topics</scope>
<scope>3:Linear Algebra</scope>
</scopes>
<sm-arch>sm35</sm-arch>
<sm-arch>sm37</sm-arch>
<sm-arch>sm50</sm-arch>
<sm-arch>sm52</sm-arch>
<sm-arch>sm53</sm-arch>

View File

@@ -10,7 +10,7 @@ Linear Algebra, CUBLAS Library
## Supported SM Architectures
[SM 3.5 ](https://developer.nvidia.com/cuda-gpus) [SM 3.7 ](https://developer.nvidia.com/cuda-gpus) [SM 5.0 ](https://developer.nvidia.com/cuda-gpus) [SM 5.2 ](https://developer.nvidia.com/cuda-gpus) [SM 5.3 ](https://developer.nvidia.com/cuda-gpus) [SM 6.0 ](https://developer.nvidia.com/cuda-gpus) [SM 6.1 ](https://developer.nvidia.com/cuda-gpus) [SM 7.0 ](https://developer.nvidia.com/cuda-gpus) [SM 7.2 ](https://developer.nvidia.com/cuda-gpus) [SM 7.5 ](https://developer.nvidia.com/cuda-gpus) [SM 8.0 ](https://developer.nvidia.com/cuda-gpus) [SM 8.6 ](https://developer.nvidia.com/cuda-gpus) [SM 8.7 ](https://developer.nvidia.com/cuda-gpus) [SM 9.0 ](https://developer.nvidia.com/cuda-gpus)
[SM 5.0 ](https://developer.nvidia.com/cuda-gpus) [SM 5.2 ](https://developer.nvidia.com/cuda-gpus) [SM 5.3 ](https://developer.nvidia.com/cuda-gpus) [SM 6.0 ](https://developer.nvidia.com/cuda-gpus) [SM 6.1 ](https://developer.nvidia.com/cuda-gpus) [SM 7.0 ](https://developer.nvidia.com/cuda-gpus) [SM 7.2 ](https://developer.nvidia.com/cuda-gpus) [SM 7.5 ](https://developer.nvidia.com/cuda-gpus) [SM 8.0 ](https://developer.nvidia.com/cuda-gpus) [SM 8.6 ](https://developer.nvidia.com/cuda-gpus) [SM 8.7 ](https://developer.nvidia.com/cuda-gpus) [SM 9.0 ](https://developer.nvidia.com/cuda-gpus)
## Supported OSes
@@ -33,7 +33,7 @@ cudaMemcpy, cudaGetErrorString, cudaFree, cudaGetLastError, cudaDeviceSynchroniz
## Prerequisites
Download and install the [CUDA Toolkit 11.8](https://developer.nvidia.com/cuda-downloads) for your corresponding platform.
Download and install the [CUDA Toolkit 12.0](https://developer.nvidia.com/cuda-downloads) for your corresponding platform.
Make sure the dependencies mentioned in [Dependencies]() section above are installed.
## Build and Run

View File

@@ -38,7 +38,7 @@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
<Import Project="$(CUDAPropsPath)\CUDA 11.8.props" />
<Import Project="$(CUDAPropsPath)\CUDA 12.0.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets">
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
@@ -67,7 +67,7 @@
<OutputFile>$(OutDir)/batchCUBLAS.exe</OutputFile>
</Link>
<CudaCompile>
<CodeGeneration>compute_35,compute_35;</CodeGeneration>
<CodeGeneration>compute_50,compute_50;</CodeGeneration>
<AdditionalOptions>-Xcompiler "/wd 4819" --threads 0 </AdditionalOptions>
<Include>./;../../../Common</Include>
<Defines>WIN32</Defines>
@@ -107,6 +107,6 @@
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="$(CUDAPropsPath)\CUDA 11.8.targets" />
<Import Project="$(CUDAPropsPath)\CUDA 12.0.targets" />
</ImportGroup>
</Project>

View File

@@ -34,7 +34,7 @@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
<Import Project="$(CUDAPropsPath)\CUDA 11.8.props" />
<Import Project="$(CUDAPropsPath)\CUDA 12.0.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets">
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
@@ -63,7 +63,7 @@
<OutputFile>$(OutDir)/batchCUBLAS.exe</OutputFile>
</Link>
<CudaCompile>
<CodeGeneration>compute_35,compute_35;</CodeGeneration>
<CodeGeneration>compute_50,compute_50;</CodeGeneration>
<AdditionalOptions>-Xcompiler "/wd 4819" --threads 0 </AdditionalOptions>
<Include>./;../../../Common</Include>
<Defines>WIN32</Defines>
@@ -103,6 +103,6 @@
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="$(CUDAPropsPath)\CUDA 11.8.targets" />
<Import Project="$(CUDAPropsPath)\CUDA 12.0.targets" />
</ImportGroup>
</Project>

View File

@@ -34,7 +34,7 @@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
<Import Project="$(CUDAPropsPath)\CUDA 11.8.props" />
<Import Project="$(CUDAPropsPath)\CUDA 12.0.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets">
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
@@ -63,7 +63,7 @@
<OutputFile>$(OutDir)/batchCUBLAS.exe</OutputFile>
</Link>
<CudaCompile>
<CodeGeneration>compute_35,compute_35;</CodeGeneration>
<CodeGeneration>compute_50,compute_50;</CodeGeneration>
<AdditionalOptions>-Xcompiler "/wd 4819" --threads 0 </AdditionalOptions>
<Include>./;../../../Common</Include>
<Defines>WIN32</Defines>
@@ -103,6 +103,6 @@
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="$(CUDAPropsPath)\CUDA 11.8.targets" />
<Import Project="$(CUDAPropsPath)\CUDA 12.0.targets" />
</ImportGroup>
</Project>

View File

@@ -301,8 +301,8 @@ ifeq ($(TARGET_ARCH),$(filter $(TARGET_ARCH),armv7l aarch64 sbsa))
# Generate PTX code from SM 53
GENCODE_FLAGS += -gencode arch=compute_53,code=compute_53
else
# Generate PTX code from SM 35
GENCODE_FLAGS += -gencode arch=compute_35,code=compute_35
# Generate PTX code from SM 50
GENCODE_FLAGS += -gencode arch=compute_50,code=compute_50
endif
endif

View File

@@ -55,8 +55,6 @@
<scope>2:Image Processing</scope>
<scope>2:Computer Vision</scope>
</scopes>
<sm-arch>sm35</sm-arch>
<sm-arch>sm37</sm-arch>
<sm-arch>sm50</sm-arch>
<sm-arch>sm52</sm-arch>
<sm-arch>sm53</sm-arch>

View File

@@ -10,7 +10,7 @@ Performance Strategies, Image Processing, NPP Library, Using NPP Batch Functions
## Supported SM Architectures
[SM 3.5 ](https://developer.nvidia.com/cuda-gpus) [SM 3.7 ](https://developer.nvidia.com/cuda-gpus) [SM 5.0 ](https://developer.nvidia.com/cuda-gpus) [SM 5.2 ](https://developer.nvidia.com/cuda-gpus) [SM 5.3 ](https://developer.nvidia.com/cuda-gpus) [SM 6.0 ](https://developer.nvidia.com/cuda-gpus) [SM 6.1 ](https://developer.nvidia.com/cuda-gpus) [SM 7.0 ](https://developer.nvidia.com/cuda-gpus) [SM 7.2 ](https://developer.nvidia.com/cuda-gpus) [SM 7.5 ](https://developer.nvidia.com/cuda-gpus) [SM 8.0 ](https://developer.nvidia.com/cuda-gpus) [SM 8.6 ](https://developer.nvidia.com/cuda-gpus) [SM 8.7 ](https://developer.nvidia.com/cuda-gpus) [SM 9.0 ](https://developer.nvidia.com/cuda-gpus)
[SM 5.0 ](https://developer.nvidia.com/cuda-gpus) [SM 5.2 ](https://developer.nvidia.com/cuda-gpus) [SM 5.3 ](https://developer.nvidia.com/cuda-gpus) [SM 6.0 ](https://developer.nvidia.com/cuda-gpus) [SM 6.1 ](https://developer.nvidia.com/cuda-gpus) [SM 7.0 ](https://developer.nvidia.com/cuda-gpus) [SM 7.2 ](https://developer.nvidia.com/cuda-gpus) [SM 7.5 ](https://developer.nvidia.com/cuda-gpus) [SM 8.0 ](https://developer.nvidia.com/cuda-gpus) [SM 8.6 ](https://developer.nvidia.com/cuda-gpus) [SM 8.7 ](https://developer.nvidia.com/cuda-gpus) [SM 9.0 ](https://developer.nvidia.com/cuda-gpus)
## Supported OSes
@@ -30,7 +30,7 @@ cudaRuntimeGetVersion, cudaMallocPitch, cudaFree, cudaDeviceGetAttribute, cudaMa
## Prerequisites
Download and install the [CUDA Toolkit 11.8](https://developer.nvidia.com/cuda-downloads) for your corresponding platform.
Download and install the [CUDA Toolkit 12.0](https://developer.nvidia.com/cuda-downloads) for your corresponding platform.
Make sure the dependencies mentioned in [Dependencies]() section above are installed.
## Build and Run

View File

@@ -38,7 +38,7 @@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
<Import Project="$(CUDAPropsPath)\CUDA 11.8.props" />
<Import Project="$(CUDAPropsPath)\CUDA 12.0.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets">
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
@@ -67,7 +67,7 @@
<OutputFile>$(OutDir)/batchedLabelMarkersAndLabelCompressionNPP.exe</OutputFile>
</Link>
<CudaCompile>
<CodeGeneration>compute_35,compute_35;</CodeGeneration>
<CodeGeneration>compute_50,compute_50;</CodeGeneration>
<AdditionalOptions>-Xcompiler "/wd 4819" --threads 0 </AdditionalOptions>
<Include>./;../../../Common</Include>
<Defines>WIN32</Defines>
@@ -107,6 +107,6 @@
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="$(CUDAPropsPath)\CUDA 11.8.targets" />
<Import Project="$(CUDAPropsPath)\CUDA 12.0.targets" />
</ImportGroup>
</Project>

View File

@@ -34,7 +34,7 @@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
<Import Project="$(CUDAPropsPath)\CUDA 11.8.props" />
<Import Project="$(CUDAPropsPath)\CUDA 12.0.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets">
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
@@ -63,7 +63,7 @@
<OutputFile>$(OutDir)/batchedLabelMarkersAndLabelCompressionNPP.exe</OutputFile>
</Link>
<CudaCompile>
<CodeGeneration>compute_35,compute_35;</CodeGeneration>
<CodeGeneration>compute_50,compute_50;</CodeGeneration>
<AdditionalOptions>-Xcompiler "/wd 4819" --threads 0 </AdditionalOptions>
<Include>./;../../../Common</Include>
<Defines>WIN32</Defines>
@@ -103,6 +103,6 @@
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="$(CUDAPropsPath)\CUDA 11.8.targets" />
<Import Project="$(CUDAPropsPath)\CUDA 12.0.targets" />
</ImportGroup>
</Project>

View File

@@ -34,7 +34,7 @@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
<Import Project="$(CUDAPropsPath)\CUDA 11.8.props" />
<Import Project="$(CUDAPropsPath)\CUDA 12.0.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets">
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
@@ -63,7 +63,7 @@
<OutputFile>$(OutDir)/batchedLabelMarkersAndLabelCompressionNPP.exe</OutputFile>
</Link>
<CudaCompile>
<CodeGeneration>compute_35,compute_35;</CodeGeneration>
<CodeGeneration>compute_50,compute_50;</CodeGeneration>
<AdditionalOptions>-Xcompiler "/wd 4819" --threads 0 </AdditionalOptions>
<Include>./;../../../Common</Include>
<Defines>WIN32</Defines>
@@ -103,6 +103,6 @@
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="$(CUDAPropsPath)\CUDA 11.8.targets" />
<Import Project="$(CUDAPropsPath)\CUDA 12.0.targets" />
</ImportGroup>
</Project>

View File

@@ -295,8 +295,8 @@ ifeq ($(TARGET_ARCH),$(filter $(TARGET_ARCH),armv7l aarch64 sbsa))
# Generate PTX code from SM 53
GENCODE_FLAGS += -gencode arch=compute_53,code=compute_53
else
# Generate PTX code from SM 35
GENCODE_FLAGS += -gencode arch=compute_35,code=compute_35
# Generate PTX code from SM 50
GENCODE_FLAGS += -gencode arch=compute_50,code=compute_50
endif
endif

View File

@@ -51,8 +51,6 @@
<scope>2:Image Processing</scope>
<scope>2:Computer Vision</scope>
</scopes>
<sm-arch>sm35</sm-arch>
<sm-arch>sm37</sm-arch>
<sm-arch>sm50</sm-arch>
<sm-arch>sm52</sm-arch>
<sm-arch>sm53</sm-arch>

View File

@@ -10,7 +10,7 @@ Performance Strategies, Image Processing, NPP Library
## Supported SM Architectures
[SM 3.5 ](https://developer.nvidia.com/cuda-gpus) [SM 3.7 ](https://developer.nvidia.com/cuda-gpus) [SM 5.0 ](https://developer.nvidia.com/cuda-gpus) [SM 5.2 ](https://developer.nvidia.com/cuda-gpus) [SM 5.3 ](https://developer.nvidia.com/cuda-gpus) [SM 6.0 ](https://developer.nvidia.com/cuda-gpus) [SM 6.1 ](https://developer.nvidia.com/cuda-gpus) [SM 7.0 ](https://developer.nvidia.com/cuda-gpus) [SM 7.2 ](https://developer.nvidia.com/cuda-gpus) [SM 7.5 ](https://developer.nvidia.com/cuda-gpus) [SM 8.0 ](https://developer.nvidia.com/cuda-gpus) [SM 8.6 ](https://developer.nvidia.com/cuda-gpus) [SM 8.7 ](https://developer.nvidia.com/cuda-gpus) [SM 9.0 ](https://developer.nvidia.com/cuda-gpus)
[SM 5.0 ](https://developer.nvidia.com/cuda-gpus) [SM 5.2 ](https://developer.nvidia.com/cuda-gpus) [SM 5.3 ](https://developer.nvidia.com/cuda-gpus) [SM 6.0 ](https://developer.nvidia.com/cuda-gpus) [SM 6.1 ](https://developer.nvidia.com/cuda-gpus) [SM 7.0 ](https://developer.nvidia.com/cuda-gpus) [SM 7.2 ](https://developer.nvidia.com/cuda-gpus) [SM 7.5 ](https://developer.nvidia.com/cuda-gpus) [SM 8.0 ](https://developer.nvidia.com/cuda-gpus) [SM 8.6 ](https://developer.nvidia.com/cuda-gpus) [SM 8.7 ](https://developer.nvidia.com/cuda-gpus) [SM 9.0 ](https://developer.nvidia.com/cuda-gpus)
## Supported OSes
@@ -30,7 +30,7 @@ cudaRuntimeGetVersion, cudaDriverGetVersion
## Prerequisites
Download and install the [CUDA Toolkit 11.8](https://developer.nvidia.com/cuda-downloads) for your corresponding platform.
Download and install the [CUDA Toolkit 12.0](https://developer.nvidia.com/cuda-downloads) for your corresponding platform.
Make sure the dependencies mentioned in [Dependencies]() section above are installed.
## Build and Run

View File

@@ -38,7 +38,7 @@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
<Import Project="$(CUDAPropsPath)\CUDA 11.8.props" />
<Import Project="$(CUDAPropsPath)\CUDA 12.0.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets">
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
@@ -67,7 +67,7 @@
<OutputFile>$(OutDir)/boxFilterNPP.exe</OutputFile>
</Link>
<CudaCompile>
<CodeGeneration>compute_35,compute_35;</CodeGeneration>
<CodeGeneration>compute_50,compute_50;</CodeGeneration>
<AdditionalOptions>-Xcompiler "/wd 4819" --threads 0 </AdditionalOptions>
<Include>./;../../../Common</Include>
<Defines>WIN32</Defines>
@@ -117,6 +117,6 @@
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="$(CUDAPropsPath)\CUDA 11.8.targets" />
<Import Project="$(CUDAPropsPath)\CUDA 12.0.targets" />
</ImportGroup>
</Project>

View File

@@ -34,7 +34,7 @@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
<Import Project="$(CUDAPropsPath)\CUDA 11.8.props" />
<Import Project="$(CUDAPropsPath)\CUDA 12.0.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets">
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
@@ -63,7 +63,7 @@
<OutputFile>$(OutDir)/boxFilterNPP.exe</OutputFile>
</Link>
<CudaCompile>
<CodeGeneration>compute_35,compute_35;</CodeGeneration>
<CodeGeneration>compute_50,compute_50;</CodeGeneration>
<AdditionalOptions>-Xcompiler "/wd 4819" --threads 0 </AdditionalOptions>
<Include>./;../../../Common</Include>
<Defines>WIN32</Defines>
@@ -113,6 +113,6 @@
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="$(CUDAPropsPath)\CUDA 11.8.targets" />
<Import Project="$(CUDAPropsPath)\CUDA 12.0.targets" />
</ImportGroup>
</Project>

View File

@@ -34,7 +34,7 @@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
<Import Project="$(CUDAPropsPath)\CUDA 11.8.props" />
<Import Project="$(CUDAPropsPath)\CUDA 12.0.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets">
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
@@ -63,7 +63,7 @@
<OutputFile>$(OutDir)/boxFilterNPP.exe</OutputFile>
</Link>
<CudaCompile>
<CodeGeneration>compute_35,compute_35;</CodeGeneration>
<CodeGeneration>compute_50,compute_50;</CodeGeneration>
<AdditionalOptions>-Xcompiler "/wd 4819" --threads 0 </AdditionalOptions>
<Include>./;../../../Common</Include>
<Defines>WIN32</Defines>
@@ -113,6 +113,6 @@
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="$(CUDAPropsPath)\CUDA 11.8.targets" />
<Import Project="$(CUDAPropsPath)\CUDA 12.0.targets" />
</ImportGroup>
</Project>

View File

@@ -295,8 +295,8 @@ ifeq ($(TARGET_ARCH),$(filter $(TARGET_ARCH),armv7l aarch64 sbsa))
# Generate PTX code from SM 53
GENCODE_FLAGS += -gencode arch=compute_53,code=compute_53
else
# Generate PTX code from SM 35
GENCODE_FLAGS += -gencode arch=compute_35,code=compute_35
# Generate PTX code from SM 50
GENCODE_FLAGS += -gencode arch=compute_50,code=compute_50
endif
endif

View File

@@ -53,8 +53,6 @@
<scope>2:Image Processing</scope>
<scope>2:Computer Vision</scope>
</scopes>
<sm-arch>sm35</sm-arch>
<sm-arch>sm37</sm-arch>
<sm-arch>sm50</sm-arch>
<sm-arch>sm52</sm-arch>
<sm-arch>sm53</sm-arch>

View File

@@ -10,7 +10,7 @@ Performance Strategies, Image Processing, NPP Library
## Supported SM Architectures
[SM 3.5 ](https://developer.nvidia.com/cuda-gpus) [SM 3.7 ](https://developer.nvidia.com/cuda-gpus) [SM 5.0 ](https://developer.nvidia.com/cuda-gpus) [SM 5.2 ](https://developer.nvidia.com/cuda-gpus) [SM 5.3 ](https://developer.nvidia.com/cuda-gpus) [SM 6.0 ](https://developer.nvidia.com/cuda-gpus) [SM 6.1 ](https://developer.nvidia.com/cuda-gpus) [SM 7.0 ](https://developer.nvidia.com/cuda-gpus) [SM 7.2 ](https://developer.nvidia.com/cuda-gpus) [SM 7.5 ](https://developer.nvidia.com/cuda-gpus) [SM 8.0 ](https://developer.nvidia.com/cuda-gpus) [SM 8.6 ](https://developer.nvidia.com/cuda-gpus) [SM 8.7 ](https://developer.nvidia.com/cuda-gpus) [SM 9.0 ](https://developer.nvidia.com/cuda-gpus)
[SM 5.0 ](https://developer.nvidia.com/cuda-gpus) [SM 5.2 ](https://developer.nvidia.com/cuda-gpus) [SM 5.3 ](https://developer.nvidia.com/cuda-gpus) [SM 6.0 ](https://developer.nvidia.com/cuda-gpus) [SM 6.1 ](https://developer.nvidia.com/cuda-gpus) [SM 7.0 ](https://developer.nvidia.com/cuda-gpus) [SM 7.2 ](https://developer.nvidia.com/cuda-gpus) [SM 7.5 ](https://developer.nvidia.com/cuda-gpus) [SM 8.0 ](https://developer.nvidia.com/cuda-gpus) [SM 8.6 ](https://developer.nvidia.com/cuda-gpus) [SM 8.7 ](https://developer.nvidia.com/cuda-gpus) [SM 9.0 ](https://developer.nvidia.com/cuda-gpus)
## Supported OSes
@@ -30,7 +30,7 @@ cudaRuntimeGetVersion, cudaFree, cudaSetDevice, cudaGetDeviceCount, cudaDeviceIn
## Prerequisites
Download and install the [CUDA Toolkit 11.8](https://developer.nvidia.com/cuda-downloads) for your corresponding platform.
Download and install the [CUDA Toolkit 12.0](https://developer.nvidia.com/cuda-downloads) for your corresponding platform.
Make sure the dependencies mentioned in [Dependencies]() section above are installed.
## Build and Run

View File

@@ -38,7 +38,7 @@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
<Import Project="$(CUDAPropsPath)\CUDA 11.8.props" />
<Import Project="$(CUDAPropsPath)\CUDA 12.0.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets">
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
@@ -67,7 +67,7 @@
<OutputFile>$(OutDir)/cannyEdgeDetectorNPP.exe</OutputFile>
</Link>
<CudaCompile>
<CodeGeneration>compute_35,compute_35;</CodeGeneration>
<CodeGeneration>compute_50,compute_50;</CodeGeneration>
<AdditionalOptions>-Xcompiler "/wd 4819" --threads 0 </AdditionalOptions>
<Include>./;../../../Common</Include>
<Defines>WIN32</Defines>
@@ -117,6 +117,6 @@
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="$(CUDAPropsPath)\CUDA 11.8.targets" />
<Import Project="$(CUDAPropsPath)\CUDA 12.0.targets" />
</ImportGroup>
</Project>

View File

@@ -34,7 +34,7 @@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
<Import Project="$(CUDAPropsPath)\CUDA 11.8.props" />
<Import Project="$(CUDAPropsPath)\CUDA 12.0.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets">
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
@@ -63,7 +63,7 @@
<OutputFile>$(OutDir)/cannyEdgeDetectorNPP.exe</OutputFile>
</Link>
<CudaCompile>
<CodeGeneration>compute_35,compute_35;</CodeGeneration>
<CodeGeneration>compute_50,compute_50;</CodeGeneration>
<AdditionalOptions>-Xcompiler "/wd 4819" --threads 0 </AdditionalOptions>
<Include>./;../../../Common</Include>
<Defines>WIN32</Defines>
@@ -113,6 +113,6 @@
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="$(CUDAPropsPath)\CUDA 11.8.targets" />
<Import Project="$(CUDAPropsPath)\CUDA 12.0.targets" />
</ImportGroup>
</Project>

View File

@@ -34,7 +34,7 @@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
<Import Project="$(CUDAPropsPath)\CUDA 11.8.props" />
<Import Project="$(CUDAPropsPath)\CUDA 12.0.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets">
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
@@ -63,7 +63,7 @@
<OutputFile>$(OutDir)/cannyEdgeDetectorNPP.exe</OutputFile>
</Link>
<CudaCompile>
<CodeGeneration>compute_35,compute_35;</CodeGeneration>
<CodeGeneration>compute_50,compute_50;</CodeGeneration>
<AdditionalOptions>-Xcompiler "/wd 4819" --threads 0 </AdditionalOptions>
<Include>./;../../../Common</Include>
<Defines>WIN32</Defines>
@@ -113,6 +113,6 @@
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="$(CUDAPropsPath)\CUDA 11.8.targets" />
<Import Project="$(CUDAPropsPath)\CUDA 12.0.targets" />
</ImportGroup>
</Project>

View File

@@ -287,8 +287,8 @@ ifeq ($(TARGET_ARCH),$(filter $(TARGET_ARCH),armv7l aarch64 sbsa))
# Generate PTX code from SM 53
GENCODE_FLAGS += -gencode arch=compute_53,code=compute_53
else
# Generate PTX code from SM 35
GENCODE_FLAGS += -gencode arch=compute_35,code=compute_35
# Generate PTX code from SM 50
GENCODE_FLAGS += -gencode arch=compute_50,code=compute_50
endif
endif

View File

@@ -46,8 +46,6 @@
<scope>1:CUDA Advanced Topics</scope>
<scope>3:Linear Algebra</scope>
</scopes>
<sm-arch>sm35</sm-arch>
<sm-arch>sm37</sm-arch>
<sm-arch>sm50</sm-arch>
<sm-arch>sm52</sm-arch>
<sm-arch>sm53</sm-arch>

View File

@@ -10,7 +10,7 @@ Linear Algebra, CUBLAS Library, CUSPARSE Library
## Supported SM Architectures
[SM 3.5 ](https://developer.nvidia.com/cuda-gpus) [SM 3.7 ](https://developer.nvidia.com/cuda-gpus) [SM 5.0 ](https://developer.nvidia.com/cuda-gpus) [SM 5.2 ](https://developer.nvidia.com/cuda-gpus) [SM 5.3 ](https://developer.nvidia.com/cuda-gpus) [SM 6.0 ](https://developer.nvidia.com/cuda-gpus) [SM 6.1 ](https://developer.nvidia.com/cuda-gpus) [SM 7.0 ](https://developer.nvidia.com/cuda-gpus) [SM 7.2 ](https://developer.nvidia.com/cuda-gpus) [SM 7.5 ](https://developer.nvidia.com/cuda-gpus) [SM 8.0 ](https://developer.nvidia.com/cuda-gpus) [SM 8.6 ](https://developer.nvidia.com/cuda-gpus) [SM 8.7 ](https://developer.nvidia.com/cuda-gpus) [SM 9.0 ](https://developer.nvidia.com/cuda-gpus)
[SM 5.0 ](https://developer.nvidia.com/cuda-gpus) [SM 5.2 ](https://developer.nvidia.com/cuda-gpus) [SM 5.3 ](https://developer.nvidia.com/cuda-gpus) [SM 6.0 ](https://developer.nvidia.com/cuda-gpus) [SM 6.1 ](https://developer.nvidia.com/cuda-gpus) [SM 7.0 ](https://developer.nvidia.com/cuda-gpus) [SM 7.2 ](https://developer.nvidia.com/cuda-gpus) [SM 7.5 ](https://developer.nvidia.com/cuda-gpus) [SM 8.0 ](https://developer.nvidia.com/cuda-gpus) [SM 8.6 ](https://developer.nvidia.com/cuda-gpus) [SM 8.7 ](https://developer.nvidia.com/cuda-gpus) [SM 9.0 ](https://developer.nvidia.com/cuda-gpus)
## Supported OSes
@@ -30,7 +30,7 @@ cudaMemcpy, cudaFree, cudaDeviceSynchronize, cudaMalloc, cudaGetDeviceProperties
## Prerequisites
Download and install the [CUDA Toolkit 11.8](https://developer.nvidia.com/cuda-downloads) for your corresponding platform.
Download and install the [CUDA Toolkit 12.0](https://developer.nvidia.com/cuda-downloads) for your corresponding platform.
Make sure the dependencies mentioned in [Dependencies]() section above are installed.
## Build and Run

View File

@@ -38,7 +38,7 @@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
<Import Project="$(CUDAPropsPath)\CUDA 11.8.props" />
<Import Project="$(CUDAPropsPath)\CUDA 12.0.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets">
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
@@ -67,7 +67,7 @@
<OutputFile>$(OutDir)/conjugateGradient.exe</OutputFile>
</Link>
<CudaCompile>
<CodeGeneration>compute_35,compute_35;</CodeGeneration>
<CodeGeneration>compute_50,compute_50;</CodeGeneration>
<AdditionalOptions>-Xcompiler "/wd 4819" --threads 0 </AdditionalOptions>
<Include>./;../../../Common</Include>
<Defines>WIN32</Defines>
@@ -107,6 +107,6 @@
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="$(CUDAPropsPath)\CUDA 11.8.targets" />
<Import Project="$(CUDAPropsPath)\CUDA 12.0.targets" />
</ImportGroup>
</Project>

View File

@@ -34,7 +34,7 @@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
<Import Project="$(CUDAPropsPath)\CUDA 11.8.props" />
<Import Project="$(CUDAPropsPath)\CUDA 12.0.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets">
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
@@ -63,7 +63,7 @@
<OutputFile>$(OutDir)/conjugateGradient.exe</OutputFile>
</Link>
<CudaCompile>
<CodeGeneration>compute_35,compute_35;</CodeGeneration>
<CodeGeneration>compute_50,compute_50;</CodeGeneration>
<AdditionalOptions>-Xcompiler "/wd 4819" --threads 0 </AdditionalOptions>
<Include>./;../../../Common</Include>
<Defines>WIN32</Defines>
@@ -103,6 +103,6 @@
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="$(CUDAPropsPath)\CUDA 11.8.targets" />
<Import Project="$(CUDAPropsPath)\CUDA 12.0.targets" />
</ImportGroup>
</Project>

View File

@@ -34,7 +34,7 @@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
<Import Project="$(CUDAPropsPath)\CUDA 11.8.props" />
<Import Project="$(CUDAPropsPath)\CUDA 12.0.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets">
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
@@ -63,7 +63,7 @@
<OutputFile>$(OutDir)/conjugateGradient.exe</OutputFile>
</Link>
<CudaCompile>
<CodeGeneration>compute_35,compute_35;</CodeGeneration>
<CodeGeneration>compute_50,compute_50;</CodeGeneration>
<AdditionalOptions>-Xcompiler "/wd 4819" --threads 0 </AdditionalOptions>
<Include>./;../../../Common</Include>
<Defines>WIN32</Defines>
@@ -103,6 +103,6 @@
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="$(CUDAPropsPath)\CUDA 11.8.targets" />
<Import Project="$(CUDAPropsPath)\CUDA 12.0.targets" />
</ImportGroup>
</Project>

View File

@@ -281,7 +281,7 @@ LIBRARIES :=
ifeq ($(TARGET_ARCH),$(filter $(TARGET_ARCH),armv7l aarch64 sbsa))
SMS ?= 53 61 70 72 75 80 86 87 90
else
SMS ?= 35 37 50 52 60 61 70 75 80 86 90
SMS ?= 50 52 60 61 70 75 80 86 90
endif
ifeq ($(SMS),)

View File

@@ -58,8 +58,6 @@
<scope>3:Linear Algebra</scope>
<scope>1:CUDA Graphs</scope>
</scopes>
<sm-arch>sm35</sm-arch>
<sm-arch>sm37</sm-arch>
<sm-arch>sm50</sm-arch>
<sm-arch>sm52</sm-arch>
<sm-arch>sm53</sm-arch>

View File

@@ -10,7 +10,7 @@ Linear Algebra, CUBLAS Library, CUSPARSE Library
## Supported SM Architectures
[SM 3.5 ](https://developer.nvidia.com/cuda-gpus) [SM 3.7 ](https://developer.nvidia.com/cuda-gpus) [SM 5.0 ](https://developer.nvidia.com/cuda-gpus) [SM 5.2 ](https://developer.nvidia.com/cuda-gpus) [SM 5.3 ](https://developer.nvidia.com/cuda-gpus) [SM 6.0 ](https://developer.nvidia.com/cuda-gpus) [SM 6.1 ](https://developer.nvidia.com/cuda-gpus) [SM 7.0 ](https://developer.nvidia.com/cuda-gpus) [SM 7.2 ](https://developer.nvidia.com/cuda-gpus) [SM 7.5 ](https://developer.nvidia.com/cuda-gpus) [SM 8.0 ](https://developer.nvidia.com/cuda-gpus) [SM 8.6 ](https://developer.nvidia.com/cuda-gpus) [SM 8.7 ](https://developer.nvidia.com/cuda-gpus) [SM 9.0 ](https://developer.nvidia.com/cuda-gpus)
[SM 5.0 ](https://developer.nvidia.com/cuda-gpus) [SM 5.2 ](https://developer.nvidia.com/cuda-gpus) [SM 5.3 ](https://developer.nvidia.com/cuda-gpus) [SM 6.0 ](https://developer.nvidia.com/cuda-gpus) [SM 6.1 ](https://developer.nvidia.com/cuda-gpus) [SM 7.0 ](https://developer.nvidia.com/cuda-gpus) [SM 7.2 ](https://developer.nvidia.com/cuda-gpus) [SM 7.5 ](https://developer.nvidia.com/cuda-gpus) [SM 8.0 ](https://developer.nvidia.com/cuda-gpus) [SM 8.6 ](https://developer.nvidia.com/cuda-gpus) [SM 8.7 ](https://developer.nvidia.com/cuda-gpus) [SM 9.0 ](https://developer.nvidia.com/cuda-gpus)
## Supported OSes
@@ -30,7 +30,7 @@ cudaGraphInstantiate, cudaStreamDestroy, cudaStreamBeginCapture, cudaFree, cudaM
## Prerequisites
Download and install the [CUDA Toolkit 11.8](https://developer.nvidia.com/cuda-downloads) for your corresponding platform.
Download and install the [CUDA Toolkit 12.0](https://developer.nvidia.com/cuda-downloads) for your corresponding platform.
Make sure the dependencies mentioned in [Dependencies]() section above are installed.
## Build and Run

View File

@@ -38,7 +38,7 @@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
<Import Project="$(CUDAPropsPath)\CUDA 11.8.props" />
<Import Project="$(CUDAPropsPath)\CUDA 12.0.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets">
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
@@ -67,7 +67,7 @@
<OutputFile>$(OutDir)/conjugateGradientCudaGraphs.exe</OutputFile>
</Link>
<CudaCompile>
<CodeGeneration>compute_35,sm_35;compute_37,sm_37;compute_50,sm_50;compute_52,sm_52;compute_60,sm_60;compute_61,sm_61;compute_70,sm_70;compute_75,sm_75;compute_80,sm_80;compute_86,sm_86;compute_90,sm_90;</CodeGeneration>
<CodeGeneration>compute_50,sm_50;compute_52,sm_52;compute_60,sm_60;compute_61,sm_61;compute_70,sm_70;compute_75,sm_75;compute_80,sm_80;compute_86,sm_86;compute_90,sm_90;</CodeGeneration>
<AdditionalOptions>-Xcompiler "/wd 4819" --threads 0 </AdditionalOptions>
<Include>./;../../../Common</Include>
<Defines>WIN32</Defines>
@@ -107,6 +107,6 @@
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="$(CUDAPropsPath)\CUDA 11.8.targets" />
<Import Project="$(CUDAPropsPath)\CUDA 12.0.targets" />
</ImportGroup>
</Project>

View File

@@ -34,7 +34,7 @@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
<Import Project="$(CUDAPropsPath)\CUDA 11.8.props" />
<Import Project="$(CUDAPropsPath)\CUDA 12.0.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets">
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
@@ -63,7 +63,7 @@
<OutputFile>$(OutDir)/conjugateGradientCudaGraphs.exe</OutputFile>
</Link>
<CudaCompile>
<CodeGeneration>compute_35,sm_35;compute_37,sm_37;compute_50,sm_50;compute_52,sm_52;compute_60,sm_60;compute_61,sm_61;compute_70,sm_70;compute_75,sm_75;compute_80,sm_80;compute_86,sm_86;compute_90,sm_90;</CodeGeneration>
<CodeGeneration>compute_50,sm_50;compute_52,sm_52;compute_60,sm_60;compute_61,sm_61;compute_70,sm_70;compute_75,sm_75;compute_80,sm_80;compute_86,sm_86;compute_90,sm_90;</CodeGeneration>
<AdditionalOptions>-Xcompiler "/wd 4819" --threads 0 </AdditionalOptions>
<Include>./;../../../Common</Include>
<Defines>WIN32</Defines>
@@ -103,6 +103,6 @@
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="$(CUDAPropsPath)\CUDA 11.8.targets" />
<Import Project="$(CUDAPropsPath)\CUDA 12.0.targets" />
</ImportGroup>
</Project>

View File

@@ -34,7 +34,7 @@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
<Import Project="$(CUDAPropsPath)\CUDA 11.8.props" />
<Import Project="$(CUDAPropsPath)\CUDA 12.0.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets">
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
@@ -63,7 +63,7 @@
<OutputFile>$(OutDir)/conjugateGradientCudaGraphs.exe</OutputFile>
</Link>
<CudaCompile>
<CodeGeneration>compute_35,sm_35;compute_37,sm_37;compute_50,sm_50;compute_52,sm_52;compute_60,sm_60;compute_61,sm_61;compute_70,sm_70;compute_75,sm_75;compute_80,sm_80;compute_86,sm_86;compute_90,sm_90;</CodeGeneration>
<CodeGeneration>compute_50,sm_50;compute_52,sm_52;compute_60,sm_60;compute_61,sm_61;compute_70,sm_70;compute_75,sm_75;compute_80,sm_80;compute_86,sm_86;compute_90,sm_90;</CodeGeneration>
<AdditionalOptions>-Xcompiler "/wd 4819" --threads 0 </AdditionalOptions>
<Include>./;../../../Common</Include>
<Defines>WIN32</Defines>
@@ -103,6 +103,6 @@
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="$(CUDAPropsPath)\CUDA 11.8.targets" />
<Import Project="$(CUDAPropsPath)\CUDA 12.0.targets" />
</ImportGroup>
</Project>

View File

@@ -30,7 +30,7 @@ cudaFree, cudaMallocManaged, cudaDeviceSynchronize, cudaEventRecord, cudaLaunchC
## Prerequisites
Download and install the [CUDA Toolkit 11.8](https://developer.nvidia.com/cuda-downloads) for your corresponding platform.
Download and install the [CUDA Toolkit 12.0](https://developer.nvidia.com/cuda-downloads) for your corresponding platform.
Make sure the dependencies mentioned in [Dependencies]() section above are installed.
## Build and Run

View File

@@ -38,7 +38,7 @@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
<Import Project="$(CUDAPropsPath)\CUDA 11.8.props" />
<Import Project="$(CUDAPropsPath)\CUDA 12.0.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets">
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
@@ -107,6 +107,6 @@
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="$(CUDAPropsPath)\CUDA 11.8.targets" />
<Import Project="$(CUDAPropsPath)\CUDA 12.0.targets" />
</ImportGroup>
</Project>

View File

@@ -34,7 +34,7 @@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
<Import Project="$(CUDAPropsPath)\CUDA 11.8.props" />
<Import Project="$(CUDAPropsPath)\CUDA 12.0.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets">
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
@@ -103,6 +103,6 @@
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="$(CUDAPropsPath)\CUDA 11.8.targets" />
<Import Project="$(CUDAPropsPath)\CUDA 12.0.targets" />
</ImportGroup>
</Project>

View File

@@ -34,7 +34,7 @@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
<Import Project="$(CUDAPropsPath)\CUDA 11.8.props" />
<Import Project="$(CUDAPropsPath)\CUDA 12.0.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets">
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
@@ -103,6 +103,6 @@
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="$(CUDAPropsPath)\CUDA 11.8.targets" />
<Import Project="$(CUDAPropsPath)\CUDA 12.0.targets" />
</ImportGroup>
</Project>

View File

@@ -30,7 +30,7 @@ cudaHostAlloc, cudaMemPrefetchAsync, cudaFree, cudaLaunchCooperativeKernel, cuda
## Prerequisites
Download and install the [CUDA Toolkit 11.8](https://developer.nvidia.com/cuda-downloads) for your corresponding platform.
Download and install the [CUDA Toolkit 12.0](https://developer.nvidia.com/cuda-downloads) for your corresponding platform.
Make sure the dependencies mentioned in [Dependencies]() section above are installed.
## Build and Run

View File

@@ -38,7 +38,7 @@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
<Import Project="$(CUDAPropsPath)\CUDA 11.8.props" />
<Import Project="$(CUDAPropsPath)\CUDA 12.0.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets">
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
@@ -108,6 +108,6 @@
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="$(CUDAPropsPath)\CUDA 11.8.targets" />
<Import Project="$(CUDAPropsPath)\CUDA 12.0.targets" />
</ImportGroup>
</Project>

View File

@@ -34,7 +34,7 @@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
<Import Project="$(CUDAPropsPath)\CUDA 11.8.props" />
<Import Project="$(CUDAPropsPath)\CUDA 12.0.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets">
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
@@ -104,6 +104,6 @@
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="$(CUDAPropsPath)\CUDA 11.8.targets" />
<Import Project="$(CUDAPropsPath)\CUDA 12.0.targets" />
</ImportGroup>
</Project>

View File

@@ -34,7 +34,7 @@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
<Import Project="$(CUDAPropsPath)\CUDA 11.8.props" />
<Import Project="$(CUDAPropsPath)\CUDA 12.0.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets">
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
@@ -104,6 +104,6 @@
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="$(CUDAPropsPath)\CUDA 11.8.targets" />
<Import Project="$(CUDAPropsPath)\CUDA 12.0.targets" />
</ImportGroup>
</Project>

View File

@@ -287,8 +287,8 @@ ifeq ($(TARGET_ARCH),$(filter $(TARGET_ARCH),armv7l aarch64 sbsa))
# Generate PTX code from SM 53
GENCODE_FLAGS += -gencode arch=compute_53,code=compute_53
else
# Generate PTX code from SM 35
GENCODE_FLAGS += -gencode arch=compute_35,code=compute_35
# Generate PTX code from SM 50
GENCODE_FLAGS += -gencode arch=compute_50,code=compute_50
endif
endif

View File

@@ -44,8 +44,6 @@
<scope>1:CUDA Advanced Topics</scope>
<scope>3:Linear Algebra</scope>
</scopes>
<sm-arch>sm35</sm-arch>
<sm-arch>sm37</sm-arch>
<sm-arch>sm50</sm-arch>
<sm-arch>sm52</sm-arch>
<sm-arch>sm53</sm-arch>

View File

@@ -10,7 +10,7 @@ Linear Algebra, CUBLAS Library, CUSPARSE Library
## Supported SM Architectures
[SM 3.5 ](https://developer.nvidia.com/cuda-gpus) [SM 3.7 ](https://developer.nvidia.com/cuda-gpus) [SM 5.0 ](https://developer.nvidia.com/cuda-gpus) [SM 5.2 ](https://developer.nvidia.com/cuda-gpus) [SM 5.3 ](https://developer.nvidia.com/cuda-gpus) [SM 6.0 ](https://developer.nvidia.com/cuda-gpus) [SM 6.1 ](https://developer.nvidia.com/cuda-gpus) [SM 7.0 ](https://developer.nvidia.com/cuda-gpus) [SM 7.2 ](https://developer.nvidia.com/cuda-gpus) [SM 7.5 ](https://developer.nvidia.com/cuda-gpus) [SM 8.0 ](https://developer.nvidia.com/cuda-gpus) [SM 8.6 ](https://developer.nvidia.com/cuda-gpus) [SM 8.7 ](https://developer.nvidia.com/cuda-gpus) [SM 9.0 ](https://developer.nvidia.com/cuda-gpus)
[SM 5.0 ](https://developer.nvidia.com/cuda-gpus) [SM 5.2 ](https://developer.nvidia.com/cuda-gpus) [SM 5.3 ](https://developer.nvidia.com/cuda-gpus) [SM 6.0 ](https://developer.nvidia.com/cuda-gpus) [SM 6.1 ](https://developer.nvidia.com/cuda-gpus) [SM 7.0 ](https://developer.nvidia.com/cuda-gpus) [SM 7.2 ](https://developer.nvidia.com/cuda-gpus) [SM 7.5 ](https://developer.nvidia.com/cuda-gpus) [SM 8.0 ](https://developer.nvidia.com/cuda-gpus) [SM 8.6 ](https://developer.nvidia.com/cuda-gpus) [SM 8.7 ](https://developer.nvidia.com/cuda-gpus) [SM 9.0 ](https://developer.nvidia.com/cuda-gpus)
## Supported OSes
@@ -30,7 +30,7 @@ cudaMemcpy, cudaFree, cudaMemset, cudaMalloc, cudaGetDeviceProperties
## Prerequisites
Download and install the [CUDA Toolkit 11.8](https://developer.nvidia.com/cuda-downloads) for your corresponding platform.
Download and install the [CUDA Toolkit 12.0](https://developer.nvidia.com/cuda-downloads) for your corresponding platform.
Make sure the dependencies mentioned in [Dependencies]() section above are installed.
## Build and Run

View File

@@ -38,7 +38,7 @@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
<Import Project="$(CUDAPropsPath)\CUDA 11.8.props" />
<Import Project="$(CUDAPropsPath)\CUDA 12.0.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets">
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
@@ -67,7 +67,7 @@
<OutputFile>$(OutDir)/conjugateGradientPrecond.exe</OutputFile>
</Link>
<CudaCompile>
<CodeGeneration>compute_35,compute_35;</CodeGeneration>
<CodeGeneration>compute_50,compute_50;</CodeGeneration>
<AdditionalOptions>-Xcompiler "/wd 4819" --threads 0 </AdditionalOptions>
<Include>./;../../../Common</Include>
<Defines>WIN32</Defines>
@@ -107,6 +107,6 @@
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="$(CUDAPropsPath)\CUDA 11.8.targets" />
<Import Project="$(CUDAPropsPath)\CUDA 12.0.targets" />
</ImportGroup>
</Project>

View File

@@ -34,7 +34,7 @@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
<Import Project="$(CUDAPropsPath)\CUDA 11.8.props" />
<Import Project="$(CUDAPropsPath)\CUDA 12.0.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets">
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
@@ -63,7 +63,7 @@
<OutputFile>$(OutDir)/conjugateGradientPrecond.exe</OutputFile>
</Link>
<CudaCompile>
<CodeGeneration>compute_35,compute_35;</CodeGeneration>
<CodeGeneration>compute_50,compute_50;</CodeGeneration>
<AdditionalOptions>-Xcompiler "/wd 4819" --threads 0 </AdditionalOptions>
<Include>./;../../../Common</Include>
<Defines>WIN32</Defines>
@@ -103,6 +103,6 @@
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="$(CUDAPropsPath)\CUDA 11.8.targets" />
<Import Project="$(CUDAPropsPath)\CUDA 12.0.targets" />
</ImportGroup>
</Project>

View File

@@ -34,7 +34,7 @@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
<Import Project="$(CUDAPropsPath)\CUDA 11.8.props" />
<Import Project="$(CUDAPropsPath)\CUDA 12.0.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets">
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
@@ -63,7 +63,7 @@
<OutputFile>$(OutDir)/conjugateGradientPrecond.exe</OutputFile>
</Link>
<CudaCompile>
<CodeGeneration>compute_35,compute_35;</CodeGeneration>
<CodeGeneration>compute_50,compute_50;</CodeGeneration>
<AdditionalOptions>-Xcompiler "/wd 4819" --threads 0 </AdditionalOptions>
<Include>./;../../../Common</Include>
<Defines>WIN32</Defines>
@@ -103,6 +103,6 @@
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="$(CUDAPropsPath)\CUDA 11.8.targets" />
<Import Project="$(CUDAPropsPath)\CUDA 12.0.targets" />
</ImportGroup>
</Project>

View File

@@ -42,87 +42,101 @@
* benchmarking purposes.
*/
// includes, system
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
// CUDA Runtime
#include <cuda_runtime.h>
// Using updated (v2) interfaces for CUBLAS and CUSPARSE
#include <cublas_v2.h>
#include <cusparse.h>
#include <cublas_v2.h>
// Utilities and system includes
#include <helper_cuda.h> // CUDA error checking
#include <helper_functions.h> // shared functions common to CUDA Samples
#include <helper_cuda.h> // CUDA error checking
const char *sSDKname = "conjugateGradientPrecond";
const char *sSDKname = "conjugateGradientPrecond";
/*
* Generate a matrix representing a second order regular Laplacian operator
* on a 2D domain in Compressed Sparse Row format.
*/
void genLaplace(int *row_ptr, int *col_ind, float *val, int M, int N, int nz,
float *rhs) {
assert(M == N);
int n = (int)sqrt((double)N);
assert(n * n == N);
printf("laplace dimension = %d\n", n);
int idx = 0;
float *rhs)
{
assert(M==N);
int n=(int)sqrt((double)N);
assert(n*n==N);
printf("laplace dimension = %d\n", n);
int idx = 0;
// loop over degrees of freedom
for (int i = 0; i < N; i++) {
int ix = i % n;
int iy = i / n;
// loop over degrees of freedom
for (int i = 0; i < N; i++)
{
int ix = i % n;
int iy = i / n;
row_ptr[i] = idx;
row_ptr[i] = idx;
// up
if (iy > 0)
{
val[idx] = 1.0;
col_ind[idx] = i - n;
idx++;
}
else
{
rhs[i] -= 1.0;
}
// left
if (ix > 0) {
val[idx] = 1.0;
col_ind[idx] = i - 1;
idx++;
} else {
rhs[i] -= 0.0;
}
// center
val[idx] = -4.0;
col_ind[idx] = i;
idx++;
//right
if (ix < n - 1)
{
val[idx] = 1.0;
col_ind[idx] = i + 1;
idx++;
}
else
{
rhs[i] -= 0.0;
}
// down
if (iy < n - 1)
{
val[idx] = 1.0;
col_ind[idx] = i + n;
idx++;
}
else
{
rhs[i] -= 0.0;
}
// up
if (iy > 0) {
val[idx] = 1.0;
col_ind[idx] = i - n;
idx++;
} else {
rhs[i] -= 1.0;
}
// left
if (ix > 0) {
val[idx] = 1.0;
col_ind[idx] = i - 1;
idx++;
} else {
rhs[i] -= 0.0;
}
row_ptr[N] = idx;
// center
val[idx] = -4.0;
col_ind[idx] = i;
idx++;
// right
if (ix < n - 1) {
val[idx] = 1.0;
col_ind[idx] = i + 1;
idx++;
} else {
rhs[i] -= 0.0;
}
// down
if (iy < n - 1) {
val[idx] = 1.0;
col_ind[idx] = i + n;
idx++;
} else {
rhs[i] -= 0.0;
}
}
row_ptr[N] = idx;
}
/*
@@ -131,401 +145,464 @@ void genLaplace(int *row_ptr, int *col_ind, float *val, int M, int N, int nz,
* b) using an Incomplete Cholesky preconditioner, and
* c) using an ILU0 preconditioner.
*/
int main(int argc, char **argv) {
const int max_iter = 1000;
int k, M = 0, N = 0, nz = 0, *I = NULL, *J = NULL;
int *d_col, *d_row;
int qatest = 0;
const float tol = 1e-12f;
float *x, *rhs;
float r0, r1, alpha, beta;
float *d_val, *d_x;
float *d_zm1, *d_zm2, *d_rm2;
float *d_r, *d_p, *d_omega, *d_y;
float *val = NULL;
float *d_valsILU0;
void *buffer = NULL;
float rsum, diff, err = 0.0;
float qaerr1, qaerr2 = 0.0;
float dot, numerator, denominator, nalpha;
const float floatone = 1.0;
const float floatzero = 0.0;
int main(int argc, char **argv){
const int max_iter = 1000;
int k, M = 0, N = 0, nz = 0, *I = NULL, *J = NULL;
int *d_col, *d_row;
int qatest = 0;
const float tol = 1e-12f;
float *x, *rhs;
float r0, r1, alpha, beta;
float *d_val, *d_x;
float *d_zm1, *d_zm2, *d_rm2;
float *d_r, *d_p, *d_omega, *d_y;
float *val = NULL;
float *d_valsILU0;
float rsum, diff, err = 0.0;
float qaerr1, qaerr2 = 0.0;
float dot, numerator, denominator, nalpha;
const float floatone = 1.0;
const float floatzero = 0.0;
int nErrors = 0;
int nErrors = 0;
printf("conjugateGradientPrecond starting...\n");
printf("conjugateGradientPrecond starting...\n");
/* QA testing mode */
/* QA testing mode */
if (checkCmdLineFlag(argc, (const char **)argv, "qatest")) {
qatest = 1;
}
/* This will pick the best possible CUDA capable device */
cudaDeviceProp deviceProp;
int devID = findCudaDevice(argc, (const char **)argv);
printf("GPU selected Device ID = %d \n", devID);
/* This will pick the best possible CUDA capable device */
cudaDeviceProp deviceProp;
int devID = findCudaDevice(argc, (const char **)argv);
printf("GPU selected Device ID = %d \n", devID);
if (devID < 0) {
printf("Invalid GPU device %d selected, exiting...\n", devID);
exit(EXIT_SUCCESS);
}
checkCudaErrors(cudaGetDeviceProperties(&deviceProp, devID));
/* Statistics about the GPU device */
printf(
"> GPU device has %d Multi-Processors, "
"SM %d.%d compute capabilities\n\n",
deviceProp.multiProcessorCount, deviceProp.major, deviceProp.minor);
/* Generate a Laplace matrix in CSR (Compressed Sparse Row) format */
M = N = 16384;
nz = 5 * N - 4 * (int)sqrt((double)N);
I = (int *)malloc(sizeof(int) * (N + 1)); // csr row pointers for matrix A
J = (int *)malloc(sizeof(int) * nz); // csr column indices for matrix A
val = (float *)malloc(sizeof(float) * nz); // csr values for matrix A
x = (float *)malloc(sizeof(float) * N);
rhs = (float *)malloc(sizeof(float) * N);
for (int i = 0; i < N; i++) {
rhs[i] = 0.0; // Initialize RHS
x[i] = 0.0; // Initial solution approximation
}
genLaplace(I, J, val, M, N, nz, rhs);
/* Create CUBLAS context */
cublasHandle_t cublasHandle = NULL;
checkCudaErrors(cublasCreate(&cublasHandle));
/* Create CUSPARSE context */
cusparseHandle_t cusparseHandle = NULL;
checkCudaErrors(cusparseCreate(&cusparseHandle));
/* Description of the A matrix */
cusparseMatDescr_t descr = 0;
checkCudaErrors(cusparseCreateMatDescr(&descr));
checkCudaErrors(cusparseSetMatType(descr, CUSPARSE_MATRIX_TYPE_GENERAL));
checkCudaErrors(cusparseSetMatIndexBase(descr, CUSPARSE_INDEX_BASE_ZERO));
/* Allocate required memory */
checkCudaErrors(cudaMalloc((void **)&d_col, nz * sizeof(int)));
checkCudaErrors(cudaMalloc((void **)&d_row, (N + 1) * sizeof(int)));
checkCudaErrors(cudaMalloc((void **)&d_val, nz * sizeof(float)));
checkCudaErrors(cudaMalloc((void **)&d_x, N * sizeof(float)));
checkCudaErrors(cudaMalloc((void **)&d_y, N * sizeof(float)));
checkCudaErrors(cudaMalloc((void **)&d_r, N * sizeof(float)));
checkCudaErrors(cudaMalloc((void **)&d_p, N * sizeof(float)));
checkCudaErrors(cudaMalloc((void **)&d_omega, N * sizeof(float)));
checkCudaErrors(cudaMalloc((void **)&d_valsILU0, nz * sizeof(float)));
checkCudaErrors(cudaMalloc((void **)&d_zm1, (N) * sizeof(float)));
checkCudaErrors(cudaMalloc((void **)&d_zm2, (N) * sizeof(float)));
checkCudaErrors(cudaMalloc((void **)&d_rm2, (N) * sizeof(float)));
/* Wrap raw data into cuSPARSE generic API objects */
cusparseSpMatDescr_t matA = NULL;
checkCudaErrors(cusparseCreateCsr(&matA, N, N, nz, d_row, d_col, d_val,
CUSPARSE_INDEX_32I, CUSPARSE_INDEX_32I,
CUSPARSE_INDEX_BASE_ZERO, CUDA_R_32F));
cusparseDnVecDescr_t vecp = NULL;
checkCudaErrors(cusparseCreateDnVec(&vecp, N, d_p, CUDA_R_32F));
cusparseDnVecDescr_t vecomega = NULL;
checkCudaErrors(cusparseCreateDnVec(&vecomega, N, d_omega, CUDA_R_32F));
/* Initialize problem data */
checkCudaErrors(
cudaMemcpy(d_col, J, nz * sizeof(int), cudaMemcpyHostToDevice));
checkCudaErrors(
cudaMemcpy(d_row, I, (N + 1) * sizeof(int), cudaMemcpyHostToDevice));
checkCudaErrors(
cudaMemcpy(d_val, val, nz * sizeof(float), cudaMemcpyHostToDevice));
checkCudaErrors(
cudaMemcpy(d_x, x, N * sizeof(float), cudaMemcpyHostToDevice));
checkCudaErrors(
cudaMemcpy(d_r, rhs, N * sizeof(float), cudaMemcpyHostToDevice));
checkCudaErrors(cudaMemset(d_y, 0, sizeof(float) * N));
/* Create ILU(0) info object */
csrilu02Info_t infoILU = NULL;
checkCudaErrors(cusparseCreateCsrilu02Info(&infoILU));
/* Create L factor descriptor and triangular solve info */
cusparseMatDescr_t descrL = NULL;
checkCudaErrors(cusparseCreateMatDescr(&descrL));
checkCudaErrors(cusparseSetMatType(descrL, CUSPARSE_MATRIX_TYPE_GENERAL));
checkCudaErrors(cusparseSetMatIndexBase(descrL, CUSPARSE_INDEX_BASE_ZERO));
checkCudaErrors(cusparseSetMatFillMode(descrL, CUSPARSE_FILL_MODE_LOWER));
checkCudaErrors(cusparseSetMatDiagType(descrL, CUSPARSE_DIAG_TYPE_UNIT));
csrsv2Info_t infoL = NULL;
checkCudaErrors(cusparseCreateCsrsv2Info(&infoL));
/* Create U factor descriptor and triangular solve info */
cusparseMatDescr_t descrU = NULL;
checkCudaErrors(cusparseCreateMatDescr(&descrU));
checkCudaErrors(cusparseSetMatType(descrU, CUSPARSE_MATRIX_TYPE_GENERAL));
checkCudaErrors(cusparseSetMatIndexBase(descrU, CUSPARSE_INDEX_BASE_ZERO));
checkCudaErrors(cusparseSetMatFillMode(descrU, CUSPARSE_FILL_MODE_UPPER));
checkCudaErrors(cusparseSetMatDiagType(descrU, CUSPARSE_DIAG_TYPE_NON_UNIT));
csrsv2Info_t infoU = NULL;
checkCudaErrors(cusparseCreateCsrsv2Info(&infoU));
/* Allocate workspace for cuSPARSE */
size_t bufferSize = 0;
size_t tmp = 0;
int stmp = 0;
checkCudaErrors(cusparseSpMV_bufferSize(
cusparseHandle, CUSPARSE_OPERATION_NON_TRANSPOSE, &floatone, matA, vecp,
&floatzero, vecomega, CUDA_R_32F, CUSPARSE_SPMV_ALG_DEFAULT, &tmp));
if (tmp > bufferSize) {
bufferSize = stmp;
}
checkCudaErrors(cusparseScsrilu02_bufferSize(
cusparseHandle, N, nz, descr, d_val, d_row, d_col, infoILU, &stmp));
if (stmp > bufferSize) {
bufferSize = stmp;
}
checkCudaErrors(cusparseScsrsv2_bufferSize(
cusparseHandle, CUSPARSE_OPERATION_NON_TRANSPOSE, N, nz, descrL, d_val,
d_row, d_col, infoL, &stmp));
if (stmp > bufferSize) {
bufferSize = stmp;
}
checkCudaErrors(cusparseScsrsv2_bufferSize(
cusparseHandle, CUSPARSE_OPERATION_NON_TRANSPOSE, N, nz, descrU, d_val,
d_row, d_col, infoU, &stmp));
if (stmp > bufferSize) {
bufferSize = stmp;
}
checkCudaErrors(cudaMalloc(&buffer, bufferSize));
/* Conjugate gradient without preconditioning.
------------------------------------------
Follows the description by Golub & Van Loan,
"Matrix Computations 3rd ed.", Section 10.2.6 */
printf("Convergence of CG without preconditioning: \n");
k = 0;
r0 = 0;
checkCudaErrors(cublasSdot(cublasHandle, N, d_r, 1, d_r, 1, &r1));
while (r1 > tol * tol && k <= max_iter) {
k++;
if (k == 1) {
checkCudaErrors(cublasScopy(cublasHandle, N, d_r, 1, d_p, 1));
} else {
beta = r1 / r0;
checkCudaErrors(cublasSscal(cublasHandle, N, &beta, d_p, 1));
checkCudaErrors(cublasSaxpy(cublasHandle, N, &floatone, d_r, 1, d_p, 1));
if (devID < 0)
{
printf("Invalid GPU device %d selected, exiting...\n", devID);
exit(EXIT_SUCCESS);
}
checkCudaErrors(cusparseSpMV(
cusparseHandle, CUSPARSE_OPERATION_NON_TRANSPOSE, &floatone, matA, vecp,
&floatzero, vecomega, CUDA_R_32F, CUSPARSE_SPMV_ALG_DEFAULT, buffer));
checkCudaErrors(cublasSdot(cublasHandle, N, d_p, 1, d_omega, 1, &dot));
alpha = r1 / dot;
checkCudaErrors(cublasSaxpy(cublasHandle, N, &alpha, d_p, 1, d_x, 1));
nalpha = -alpha;
checkCudaErrors(cublasSaxpy(cublasHandle, N, &nalpha, d_omega, 1, d_r, 1));
r0 = r1;
checkCudaErrors(cudaGetDeviceProperties(&deviceProp, devID));
/* Statistics about the GPU device */
printf("> GPU device has %d Multi-Processors, SM %d.%d compute capabilities\n\n",
deviceProp.multiProcessorCount, deviceProp.major, deviceProp.minor);
/* Generate a Laplace matrix in CSR (Compressed Sparse Row) format */
M = N = 16384;
nz = 5 * N - 4 * (int)sqrt((double)N);
I = (int *)malloc(sizeof(int) * (N + 1)); // csr row pointers for matrix A
J = (int *)malloc(sizeof(int) * nz); // csr column indices for matrix A
val = (float *)malloc(sizeof(float) * nz); // csr values for matrix A
x = (float *)malloc(sizeof(float) * N);
rhs = (float *)malloc(sizeof(float) * N);
for (int i = 0; i < N; i++)
{
rhs[i] = 0.0; // Initialize RHS
x[i] = 0.0; // Initial solution approximation
}
genLaplace(I, J, val, M, N, nz, rhs);
/* Create CUBLAS context */
cublasHandle_t cublasHandle = NULL;
checkCudaErrors(cublasCreate(&cublasHandle));
/* Create CUSPARSE context */
cusparseHandle_t cusparseHandle = NULL;
checkCudaErrors(cusparseCreate(&cusparseHandle));
/* Description of the A matrix */
cusparseMatDescr_t descr = 0;
checkCudaErrors(cusparseCreateMatDescr(&descr));
checkCudaErrors(cusparseSetMatType(descr, CUSPARSE_MATRIX_TYPE_GENERAL));
checkCudaErrors(cusparseSetMatIndexBase(descr, CUSPARSE_INDEX_BASE_ZERO));
/* Allocate required memory */
checkCudaErrors(cudaMalloc((void **)&d_col, nz * sizeof(int)));
checkCudaErrors(cudaMalloc((void **)&d_row, (N + 1) * sizeof(int)));
checkCudaErrors(cudaMalloc((void **)&d_val, nz * sizeof(float)));
checkCudaErrors(cudaMalloc((void **)&d_x, N * sizeof(float)));
checkCudaErrors(cudaMalloc((void **)&d_y, N * sizeof(float)));
checkCudaErrors(cudaMalloc((void **)&d_r, N * sizeof(float)));
checkCudaErrors(cudaMalloc((void **)&d_p, N * sizeof(float)));
checkCudaErrors(cudaMalloc((void **)&d_omega, N * sizeof(float)));
checkCudaErrors(cudaMalloc((void **)&d_valsILU0, nz * sizeof(float)));
checkCudaErrors(cudaMalloc((void **)&d_zm1, (N) * sizeof(float)));
checkCudaErrors(cudaMalloc((void **)&d_zm2, (N) * sizeof(float)));
checkCudaErrors(cudaMalloc((void **)&d_rm2, (N) * sizeof(float)));
/* Wrap raw data into cuSPARSE generic API objects */
cusparseDnVecDescr_t vecp = NULL, vecX=NULL, vecY = NULL, vecR = NULL, vecZM1=NULL;
checkCudaErrors(cusparseCreateDnVec(&vecp, N, d_p, CUDA_R_32F));
checkCudaErrors(cusparseCreateDnVec(&vecX, N, d_x, CUDA_R_32F));
checkCudaErrors(cusparseCreateDnVec(&vecY, N, d_y, CUDA_R_32F));
checkCudaErrors(cusparseCreateDnVec(&vecR, N, d_r, CUDA_R_32F));
checkCudaErrors(cusparseCreateDnVec(&vecZM1, N, d_zm1, CUDA_R_32F));
cusparseDnVecDescr_t vecomega = NULL;
checkCudaErrors(cusparseCreateDnVec(&vecomega, N, d_omega, CUDA_R_32F));
/* Initialize problem data */
checkCudaErrors(cudaMemcpy(
d_col, J, nz * sizeof(int), cudaMemcpyHostToDevice));
checkCudaErrors(cudaMemcpy(
d_row, I, (N + 1) * sizeof(int), cudaMemcpyHostToDevice));
checkCudaErrors(cudaMemcpy(
d_val, val, nz * sizeof(float), cudaMemcpyHostToDevice));
checkCudaErrors(cudaMemcpy(
d_val, val, nz * sizeof(float), cudaMemcpyHostToDevice));
checkCudaErrors(cudaMemcpy(
d_x, x, N*sizeof(float), cudaMemcpyHostToDevice));
checkCudaErrors(cudaMemcpy(
d_r, rhs, N * sizeof(float), cudaMemcpyHostToDevice));
cusparseSpMatDescr_t matA = NULL;
cusparseSpMatDescr_t matM_lower, matM_upper;
cusparseFillMode_t fill_lower = CUSPARSE_FILL_MODE_LOWER;
cusparseDiagType_t diag_unit = CUSPARSE_DIAG_TYPE_UNIT;
cusparseFillMode_t fill_upper = CUSPARSE_FILL_MODE_UPPER;
cusparseDiagType_t diag_non_unit = CUSPARSE_DIAG_TYPE_NON_UNIT;
checkCudaErrors(cusparseCreateCsr(
&matA, N, N, nz, d_row, d_col, d_val, CUSPARSE_INDEX_32I,
CUSPARSE_INDEX_32I, CUSPARSE_INDEX_BASE_ZERO, CUDA_R_32F));
/* Copy A data to ILU(0) vals as input*/
checkCudaErrors(cudaMemcpy(
d_valsILU0, d_val, nz*sizeof(float), cudaMemcpyDeviceToDevice));
//Lower Part
checkCudaErrors( cusparseCreateCsr(&matM_lower, N, N, nz, d_row, d_col, d_valsILU0,
CUSPARSE_INDEX_32I, CUSPARSE_INDEX_32I,
CUSPARSE_INDEX_BASE_ZERO, CUDA_R_32F) );
checkCudaErrors( cusparseSpMatSetAttribute(matM_lower,
CUSPARSE_SPMAT_FILL_MODE,
&fill_lower, sizeof(fill_lower)) );
checkCudaErrors( cusparseSpMatSetAttribute(matM_lower,
CUSPARSE_SPMAT_DIAG_TYPE,
&diag_unit, sizeof(diag_unit)) );
// M_upper
checkCudaErrors( cusparseCreateCsr(&matM_upper, N, N, nz, d_row, d_col, d_valsILU0,
CUSPARSE_INDEX_32I, CUSPARSE_INDEX_32I,
CUSPARSE_INDEX_BASE_ZERO, CUDA_R_32F) );
checkCudaErrors( cusparseSpMatSetAttribute(matM_upper,
CUSPARSE_SPMAT_FILL_MODE,
&fill_upper, sizeof(fill_upper)) );
checkCudaErrors( cusparseSpMatSetAttribute(matM_upper,
CUSPARSE_SPMAT_DIAG_TYPE,
&diag_non_unit,
sizeof(diag_non_unit)) );
/* Create ILU(0) info object */
int bufferSizeLU = 0;
size_t bufferSizeMV, bufferSizeL, bufferSizeU;
void* d_bufferLU, *d_bufferMV, *d_bufferL, *d_bufferU;
cusparseSpSVDescr_t spsvDescrL, spsvDescrU;
cusparseMatDescr_t matLU;
csrilu02Info_t infoILU = NULL;
checkCudaErrors(cusparseCreateCsrilu02Info(&infoILU));
checkCudaErrors( cusparseCreateMatDescr(&matLU) );
checkCudaErrors( cusparseSetMatType(matLU, CUSPARSE_MATRIX_TYPE_GENERAL) );
checkCudaErrors( cusparseSetMatIndexBase(matLU, CUSPARSE_INDEX_BASE_ZERO) );
/* Allocate workspace for cuSPARSE */
checkCudaErrors(cusparseSpMV_bufferSize(
cusparseHandle, CUSPARSE_OPERATION_NON_TRANSPOSE, &floatone, matA,
vecp, &floatzero, vecomega, CUDA_R_32F, CUSPARSE_SPMV_ALG_DEFAULT,
&bufferSizeMV));
checkCudaErrors( cudaMalloc(&d_bufferMV, bufferSizeMV) );
checkCudaErrors(cusparseScsrilu02_bufferSize(
cusparseHandle, N, nz, matLU, d_val, d_row, d_col, infoILU, &bufferSizeLU));
checkCudaErrors( cudaMalloc(&d_bufferLU, bufferSizeLU) );
checkCudaErrors( cusparseSpSV_createDescr(&spsvDescrL) );
checkCudaErrors(cusparseSpSV_bufferSize(
cusparseHandle, CUSPARSE_OPERATION_NON_TRANSPOSE, &floatone, matM_lower, vecR, vecX, CUDA_R_32F,
CUSPARSE_SPSV_ALG_DEFAULT, spsvDescrL, &bufferSizeL));
checkCudaErrors( cudaMalloc(&d_bufferL, bufferSizeL) );
checkCudaErrors( cusparseSpSV_createDescr(&spsvDescrU) );
checkCudaErrors( cusparseSpSV_bufferSize(
cusparseHandle, CUSPARSE_OPERATION_NON_TRANSPOSE, &floatone, matM_upper, vecR, vecX, CUDA_R_32F,
CUSPARSE_SPSV_ALG_DEFAULT, spsvDescrU, &bufferSizeU));
checkCudaErrors( cudaMalloc(&d_bufferU, bufferSizeU) );
/* Conjugate gradient without preconditioning.
------------------------------------------
Follows the description by Golub & Van Loan,
"Matrix Computations 3rd ed.", Section 10.2.6 */
printf("Convergence of CG without preconditioning: \n");
k = 0;
r0 = 0;
checkCudaErrors(cublasSdot(cublasHandle, N, d_r, 1, d_r, 1, &r1));
}
printf(" iteration = %3d, residual = %e \n", k, sqrt(r1));
while (r1 > tol * tol && k <= max_iter)
{
k++;
checkCudaErrors(
cudaMemcpy(x, d_x, N * sizeof(float), cudaMemcpyDeviceToHost));
if (k == 1)
{
checkCudaErrors(cublasScopy(cublasHandle, N, d_r, 1, d_p, 1));
}
else
{
beta = r1 / r0;
checkCudaErrors(cublasSscal(cublasHandle, N, &beta, d_p, 1));
checkCudaErrors(cublasSaxpy(
cublasHandle, N, &floatone, d_r, 1, d_p, 1));
}
/* check result */
err = 0.0;
for (int i = 0; i < N; i++) {
rsum = 0.0;
for (int j = I[i]; j < I[i + 1]; j++) {
rsum += val[j] * x[J[j]];
checkCudaErrors(cusparseSpMV(
cusparseHandle, CUSPARSE_OPERATION_NON_TRANSPOSE, &floatone, matA,
vecp, &floatzero, vecomega, CUDA_R_32F, CUSPARSE_SPMV_ALG_DEFAULT,
d_bufferMV));
checkCudaErrors(cublasSdot(cublasHandle, N, d_p, 1, d_omega, 1, &dot));
alpha = r1 / dot;
checkCudaErrors(cublasSaxpy(cublasHandle, N, &alpha, d_p, 1, d_x, 1));
nalpha = -alpha;
checkCudaErrors(cublasSaxpy(
cublasHandle, N, &nalpha, d_omega, 1, d_r, 1));
r0 = r1;
checkCudaErrors(cublasSdot(cublasHandle, N, d_r, 1, d_r, 1, &r1));
}
diff = fabs(rsum - rhs[i]);
printf(" iteration = %3d, residual = %e \n", k, sqrt(r1));
if (diff > err) {
err = diff;
}
}
checkCudaErrors(cudaMemcpy(
x, d_x, N * sizeof(float), cudaMemcpyDeviceToHost));
printf(" Convergence Test: %s \n", (k <= max_iter) ? "OK" : "FAIL");
nErrors += (k > max_iter) ? 1 : 0;
qaerr1 = err;
/* check result */
err = 0.0;
if (0) {
// output result in matlab-style array
int n = (int)sqrt((double)N);
printf("a = [ ");
for (int i = 0; i < N; i++)
{
rsum = 0.0;
for (int iy = 0; iy < n; iy++) {
for (int ix = 0; ix < n; ix++) {
printf(" %f ", x[iy * n + ix]);
}
for (int j = I[i]; j < I[i + 1]; j++)
{
rsum += val[j] * x[J[j]];
}
if (iy == n - 1) {
printf(" ]");
}
diff = fabs(rsum - rhs[i]);
printf("\n");
}
}
/* Preconditioned Conjugate Gradient using ILU.
--------------------------------------------
Follows the description by Golub & Van Loan,
"Matrix Computations 3rd ed.", Algorithm 10.3.1 */
printf("\nConvergence of CG using ILU(0) preconditioning: \n");
/* Perform analysis for ILU(0) */
checkCudaErrors(cusparseScsrilu02_analysis(
cusparseHandle, N, nz, descr, d_val, d_row, d_col, infoILU,
CUSPARSE_SOLVE_POLICY_USE_LEVEL, buffer));
/* Copy A data to ILU(0) vals as input*/
checkCudaErrors(cudaMemcpy(d_valsILU0, d_val, nz * sizeof(float),
cudaMemcpyDeviceToDevice));
/* generate the ILU(0) factors */
checkCudaErrors(cusparseScsrilu02(cusparseHandle, N, nz, descr, d_valsILU0,
d_row, d_col, infoILU,
CUSPARSE_SOLVE_POLICY_USE_LEVEL, buffer));
/* perform triangular solve analysis */
checkCudaErrors(
cusparseScsrsv2_analysis(cusparseHandle, CUSPARSE_OPERATION_NON_TRANSPOSE,
N, nz, descrL, d_valsILU0, d_row, d_col, infoL,
CUSPARSE_SOLVE_POLICY_USE_LEVEL, buffer));
checkCudaErrors(
cusparseScsrsv2_analysis(cusparseHandle, CUSPARSE_OPERATION_NON_TRANSPOSE,
N, nz, descrU, d_valsILU0, d_row, d_col, infoU,
CUSPARSE_SOLVE_POLICY_USE_LEVEL, buffer));
/* reset the initial guess of the solution to zero */
for (int i = 0; i < N; i++) {
x[i] = 0.0;
}
checkCudaErrors(
cudaMemcpy(d_r, rhs, N * sizeof(float), cudaMemcpyHostToDevice));
checkCudaErrors(
cudaMemcpy(d_x, x, N * sizeof(float), cudaMemcpyHostToDevice));
k = 0;
checkCudaErrors(cublasSdot(cublasHandle, N, d_r, 1, d_r, 1, &r1));
while (r1 > tol * tol && k <= max_iter) {
// preconditioner application: d_zm1 = U^-1 L^-1 d_r
checkCudaErrors(cusparseScsrsv2_solve(
cusparseHandle, CUSPARSE_OPERATION_NON_TRANSPOSE, N, nz, &floatone,
descrL, d_valsILU0, d_row, d_col, infoL, d_r, d_y,
CUSPARSE_SOLVE_POLICY_USE_LEVEL, buffer));
checkCudaErrors(cusparseScsrsv2_solve(
cusparseHandle, CUSPARSE_OPERATION_NON_TRANSPOSE, N, nz, &floatone,
descrU, d_valsILU0, d_row, d_col, infoU, d_y, d_zm1,
CUSPARSE_SOLVE_POLICY_USE_LEVEL, buffer));
k++;
if (k == 1) {
checkCudaErrors(cublasScopy(cublasHandle, N, d_zm1, 1, d_p, 1));
} else {
checkCudaErrors(
cublasSdot(cublasHandle, N, d_r, 1, d_zm1, 1, &numerator));
checkCudaErrors(
cublasSdot(cublasHandle, N, d_rm2, 1, d_zm2, 1, &denominator));
beta = numerator / denominator;
checkCudaErrors(cublasSscal(cublasHandle, N, &beta, d_p, 1));
checkCudaErrors(
cublasSaxpy(cublasHandle, N, &floatone, d_zm1, 1, d_p, 1));
if (diff > err)
{
err = diff;
}
}
checkCudaErrors(cusparseSpMV(
cusparseHandle, CUSPARSE_OPERATION_NON_TRANSPOSE, &floatone, matA, vecp,
&floatzero, vecomega, CUDA_R_32F, CUSPARSE_SPMV_ALG_DEFAULT, buffer));
checkCudaErrors(cublasSdot(cublasHandle, N, d_r, 1, d_zm1, 1, &numerator));
checkCudaErrors(
cublasSdot(cublasHandle, N, d_p, 1, d_omega, 1, &denominator));
alpha = numerator / denominator;
checkCudaErrors(cublasSaxpy(cublasHandle, N, &alpha, d_p, 1, d_x, 1));
checkCudaErrors(cublasScopy(cublasHandle, N, d_r, 1, d_rm2, 1));
checkCudaErrors(cublasScopy(cublasHandle, N, d_zm1, 1, d_zm2, 1));
nalpha = -alpha;
checkCudaErrors(cublasSaxpy(cublasHandle, N, &nalpha, d_omega, 1, d_r, 1));
printf(" Convergence Test: %s \n", (k <= max_iter) ? "OK" : "FAIL");
nErrors += (k > max_iter) ? 1 : 0;
qaerr1 = err;
if (0)
{
// output result in matlab-style array
int n = (int)sqrt((double)N);
printf("a = [ ");
for (int iy = 0; iy < n; iy++)
{
for (int ix = 0; ix < n; ix++)
{
printf(" %f ", x[iy * n + ix]);
}
if (iy == n - 1)
{
printf(" ]");
}
printf("\n");
}
}
/* Preconditioned Conjugate Gradient using ILU.
--------------------------------------------
Follows the description by Golub & Van Loan,
"Matrix Computations 3rd ed.", Algorithm 10.3.1 */
printf("\nConvergence of CG using ILU(0) preconditioning: \n");
/* Perform analysis for ILU(0) */
checkCudaErrors(cusparseScsrilu02_analysis(
cusparseHandle, N, nz, descr, d_valsILU0, d_row, d_col, infoILU,
CUSPARSE_SOLVE_POLICY_USE_LEVEL, d_bufferLU));
/* generate the ILU(0) factors */
checkCudaErrors(cusparseScsrilu02(
cusparseHandle, N, nz, matLU, d_valsILU0, d_row, d_col, infoILU,
CUSPARSE_SOLVE_POLICY_USE_LEVEL, d_bufferLU));
/* perform triangular solve analysis */
checkCudaErrors(cusparseSpSV_analysis(
cusparseHandle, CUSPARSE_OPERATION_NON_TRANSPOSE, &floatone,
matM_lower, vecR, vecX, CUDA_R_32F,
CUSPARSE_SPSV_ALG_DEFAULT, spsvDescrL, d_bufferL));
checkCudaErrors(cusparseSpSV_analysis(
cusparseHandle, CUSPARSE_OPERATION_NON_TRANSPOSE, &floatone,
matM_upper, vecR, vecX, CUDA_R_32F,
CUSPARSE_SPSV_ALG_DEFAULT, spsvDescrU, d_bufferU));
/* reset the initial guess of the solution to zero */
for (int i = 0; i < N; i++)
{
x[i] = 0.0;
}
checkCudaErrors(cudaMemcpy(
d_r, rhs, N * sizeof(float), cudaMemcpyHostToDevice));
checkCudaErrors(cudaMemcpy(
d_x, x, N * sizeof(float), cudaMemcpyHostToDevice));
k = 0;
checkCudaErrors(cublasSdot(cublasHandle, N, d_r, 1, d_r, 1, &r1));
}
printf(" iteration = %3d, residual = %e \n", k, sqrt(r1));
while (r1 > tol * tol && k <= max_iter)
{
// preconditioner application: d_zm1 = U^-1 L^-1 d_r
checkCudaErrors(cusparseSpSV_solve(cusparseHandle,
CUSPARSE_OPERATION_NON_TRANSPOSE, &floatone,
matM_lower, vecR, vecY, CUDA_R_32F,
CUSPARSE_SPSV_ALG_DEFAULT,
spsvDescrL) );
checkCudaErrors(cusparseSpSV_solve(cusparseHandle,
CUSPARSE_OPERATION_NON_TRANSPOSE, &floatone, matM_upper,
vecY, vecZM1,
CUDA_R_32F,
CUSPARSE_SPSV_ALG_DEFAULT,
spsvDescrU));
k++;
checkCudaErrors(
cudaMemcpy(x, d_x, N * sizeof(float), cudaMemcpyDeviceToHost));
if (k == 1)
{
checkCudaErrors(cublasScopy(cublasHandle, N, d_zm1, 1, d_p, 1));
}
else
{
checkCudaErrors(cublasSdot(
cublasHandle, N, d_r, 1, d_zm1, 1, &numerator));
checkCudaErrors(cublasSdot(
cublasHandle, N, d_rm2, 1, d_zm2, 1, &denominator));
beta = numerator / denominator;
checkCudaErrors(cublasSscal(cublasHandle, N, &beta, d_p, 1));
checkCudaErrors(cublasSaxpy(
cublasHandle, N, &floatone, d_zm1, 1, d_p, 1));
}
/* check result */
err = 0.0;
for (int i = 0; i < N; i++) {
rsum = 0.0;
for (int j = I[i]; j < I[i + 1]; j++) {
rsum += val[j] * x[J[j]];
checkCudaErrors(cusparseSpMV(
cusparseHandle, CUSPARSE_OPERATION_NON_TRANSPOSE, &floatone, matA,
vecp, &floatzero, vecomega, CUDA_R_32F, CUSPARSE_SPMV_ALG_DEFAULT,
d_bufferMV));
checkCudaErrors(cublasSdot(
cublasHandle, N, d_r, 1, d_zm1, 1, &numerator));
checkCudaErrors(cublasSdot(
cublasHandle, N, d_p, 1, d_omega, 1, &denominator));
alpha = numerator / denominator;
checkCudaErrors(cublasSaxpy(cublasHandle, N, &alpha, d_p, 1, d_x, 1));
checkCudaErrors(cublasScopy(cublasHandle, N, d_r, 1, d_rm2, 1));
checkCudaErrors(cublasScopy(cublasHandle, N, d_zm1, 1, d_zm2, 1));
nalpha = -alpha;
checkCudaErrors(cublasSaxpy(
cublasHandle, N, &nalpha, d_omega, 1, d_r, 1));
checkCudaErrors(cublasSdot(cublasHandle, N, d_r, 1, d_r, 1, &r1));
}
diff = fabs(rsum - rhs[i]);
printf(" iteration = %3d, residual = %e \n", k, sqrt(r1));
if (diff > err) {
err = diff;
checkCudaErrors(cudaMemcpy(
x, d_x, N * sizeof(float), cudaMemcpyDeviceToHost));
/* check result */
err = 0.0;
for (int i = 0; i < N; i++)
{
rsum = 0.0;
for (int j = I[i]; j < I[i + 1]; j++)
{
rsum += val[j] * x[J[j]];
}
diff = fabs(rsum - rhs[i]);
if (diff > err)
{
err = diff;
}
}
}
printf(" Convergence Test: %s \n", (k <= max_iter) ? "OK" : "FAIL");
nErrors += (k > max_iter) ? 1 : 0;
qaerr2 = err;
printf(" Convergence Test: %s \n", (k <= max_iter) ? "OK" : "FAIL");
nErrors += (k > max_iter) ? 1 : 0;
qaerr2 = err;
/* Destroy descriptors */
checkCudaErrors(cusparseDestroyCsrsv2Info(infoU));
checkCudaErrors(cusparseDestroyCsrsv2Info(infoL));
checkCudaErrors(cusparseDestroyCsrilu02Info(infoILU));
checkCudaErrors(cusparseDestroyMatDescr(descrL));
checkCudaErrors(cusparseDestroyMatDescr(descrU));
checkCudaErrors(cusparseDestroyMatDescr(descr));
checkCudaErrors(cusparseDestroySpMat(matA));
checkCudaErrors(cusparseDestroyDnVec(vecp));
checkCudaErrors(cusparseDestroyDnVec(vecomega));
/* Destroy descriptors */
checkCudaErrors(cusparseDestroyCsrilu02Info(infoILU));
checkCudaErrors(cusparseDestroyMatDescr(matLU));
checkCudaErrors(cusparseSpSV_destroyDescr(spsvDescrL));
checkCudaErrors(cusparseSpSV_destroyDescr(spsvDescrU));
checkCudaErrors(cusparseDestroySpMat(matM_lower));
checkCudaErrors(cusparseDestroySpMat(matM_upper));
checkCudaErrors(cusparseDestroySpMat(matA));
checkCudaErrors(cusparseDestroyDnVec(vecp));
checkCudaErrors(cusparseDestroyDnVec(vecomega));
checkCudaErrors(cusparseDestroyDnVec(vecR));
checkCudaErrors(cusparseDestroyDnVec(vecX));
checkCudaErrors(cusparseDestroyDnVec(vecY));
checkCudaErrors(cusparseDestroyDnVec(vecZM1));
/* Destroy contexts */
checkCudaErrors(cusparseDestroy(cusparseHandle));
checkCudaErrors(cublasDestroy(cublasHandle));
/* Destroy contexts */
checkCudaErrors(cusparseDestroy(cusparseHandle));
checkCudaErrors(cublasDestroy(cublasHandle));
/* Free device memory */
free(I);
free(J);
free(val);
free(x);
free(rhs);
checkCudaErrors(cudaFree(buffer));
checkCudaErrors(cudaFree(d_col));
checkCudaErrors(cudaFree(d_row));
checkCudaErrors(cudaFree(d_val));
checkCudaErrors(cudaFree(d_x));
checkCudaErrors(cudaFree(d_y));
checkCudaErrors(cudaFree(d_r));
checkCudaErrors(cudaFree(d_p));
checkCudaErrors(cudaFree(d_omega));
checkCudaErrors(cudaFree(d_valsILU0));
checkCudaErrors(cudaFree(d_zm1));
checkCudaErrors(cudaFree(d_zm2));
checkCudaErrors(cudaFree(d_rm2));
/* Free device memory */
free(I);
free(J);
free(val);
free(x);
free(rhs);
checkCudaErrors(cudaFree(d_bufferMV));
checkCudaErrors(cudaFree(d_bufferLU));
checkCudaErrors(cudaFree(d_bufferL));
checkCudaErrors(cudaFree(d_bufferU));
checkCudaErrors(cudaFree(d_col));
checkCudaErrors(cudaFree(d_row));
checkCudaErrors(cudaFree(d_val));
checkCudaErrors(cudaFree(d_x));
checkCudaErrors(cudaFree(d_y));
checkCudaErrors(cudaFree(d_r));
checkCudaErrors(cudaFree(d_p));
checkCudaErrors(cudaFree(d_omega));
checkCudaErrors(cudaFree(d_valsILU0));
checkCudaErrors(cudaFree(d_zm1));
checkCudaErrors(cudaFree(d_zm2));
checkCudaErrors(cudaFree(d_rm2));
printf("\n");
printf("Test Summary:\n");
printf(" Counted total of %d errors\n", nErrors);
printf(" qaerr1 = %f qaerr2 = %f\n\n", fabs(qaerr1), fabs(qaerr2));
exit((nErrors == 0 && fabs(qaerr1) < 1e-5 && fabs(qaerr2) < 1e-5
? EXIT_SUCCESS
: EXIT_FAILURE));
// cudaDeviceReset causes the driver to clean up all state. While
// not mandatory in normal operation, it is good practice. It is also
// needed to ensure correct operation when the application is being
// profiled. Calling cudaDeviceReset causes all profile data to be
// flushed before the application exits
cudaDeviceReset();
printf("\n");
printf("Test Summary:\n");
printf(" Counted total of %d errors\n", nErrors);
printf(" qaerr1 = %f qaerr2 = %f\n\n", fabs(qaerr1), fabs(qaerr2));
exit((nErrors == 0 &&fabs(qaerr1) < 1e-5 && fabs(qaerr2) < 1e-5
? EXIT_SUCCESS
: EXIT_FAILURE));
}

View File

@@ -287,7 +287,7 @@ LIBRARIES :=
ifeq ($(TARGET_ARCH),$(filter $(TARGET_ARCH),armv7l aarch64 sbsa))
SMS ?= 53 61 70 72 75 80 86 87 90
else
SMS ?= 35 37 50 52 60 61 70 75 80 86 90
SMS ?= 50 52 60 61 70 75 80 86 90
endif
ifeq ($(SMS),)

View File

@@ -46,20 +46,6 @@
<scope>1:CUDA Advanced Topics</scope>
<scope>3:Linear Algebra</scope>
</scopes>
<sm-arch>sm35</sm-arch>
<sm-arch>sm37</sm-arch>
<sm-arch>sm50</sm-arch>
<sm-arch>sm52</sm-arch>
<sm-arch>sm53</sm-arch>
<sm-arch>sm60</sm-arch>
<sm-arch>sm61</sm-arch>
<sm-arch>sm70</sm-arch>
<sm-arch>sm72</sm-arch>
<sm-arch>sm75</sm-arch>
<sm-arch>sm80</sm-arch>
<sm-arch>sm86</sm-arch>
<sm-arch>sm87</sm-arch>
<sm-arch>sm90</sm-arch>
<supported_envs>
<env>
<arch>x86_64</arch>

View File

@@ -10,8 +10,6 @@ Unified Memory, Linear Algebra, CUBLAS Library, CUSPARSE Library
## Supported SM Architectures
[SM 3.5 ](https://developer.nvidia.com/cuda-gpus) [SM 3.7 ](https://developer.nvidia.com/cuda-gpus) [SM 5.0 ](https://developer.nvidia.com/cuda-gpus) [SM 5.2 ](https://developer.nvidia.com/cuda-gpus) [SM 5.3 ](https://developer.nvidia.com/cuda-gpus) [SM 6.0 ](https://developer.nvidia.com/cuda-gpus) [SM 6.1 ](https://developer.nvidia.com/cuda-gpus) [SM 7.0 ](https://developer.nvidia.com/cuda-gpus) [SM 7.2 ](https://developer.nvidia.com/cuda-gpus) [SM 7.5 ](https://developer.nvidia.com/cuda-gpus) [SM 8.0 ](https://developer.nvidia.com/cuda-gpus) [SM 8.6 ](https://developer.nvidia.com/cuda-gpus) [SM 8.7 ](https://developer.nvidia.com/cuda-gpus) [SM 9.0 ](https://developer.nvidia.com/cuda-gpus)
## Supported OSes
Linux, Windows
@@ -30,7 +28,7 @@ cudaFree, cudaMallocManaged, cudaDeviceSynchronize, cudaMalloc, cudaGetDevicePro
## Prerequisites
Download and install the [CUDA Toolkit 11.8](https://developer.nvidia.com/cuda-downloads) for your corresponding platform.
Download and install the [CUDA Toolkit 12.0](https://developer.nvidia.com/cuda-downloads) for your corresponding platform.
Make sure the dependencies mentioned in [Dependencies]() section above are installed.
## Build and Run

View File

@@ -38,7 +38,7 @@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
<Import Project="$(CUDAPropsPath)\CUDA 11.8.props" />
<Import Project="$(CUDAPropsPath)\CUDA 12.0.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets">
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
@@ -67,7 +67,7 @@
<OutputFile>$(OutDir)/conjugateGradientUM.exe</OutputFile>
</Link>
<CudaCompile>
<CodeGeneration>compute_35,sm_35;compute_37,sm_37;compute_50,sm_50;compute_52,sm_52;compute_60,sm_60;compute_61,sm_61;compute_70,sm_70;compute_75,sm_75;compute_80,sm_80;compute_86,sm_86;compute_90,sm_90;</CodeGeneration>
<CodeGeneration>compute_50,sm_50;compute_52,sm_52;compute_60,sm_60;compute_61,sm_61;compute_70,sm_70;compute_75,sm_75;compute_80,sm_80;compute_86,sm_86;compute_90,sm_90;</CodeGeneration>
<AdditionalOptions>-Xcompiler "/wd 4819" --threads 0 </AdditionalOptions>
<Include>./;../../../Common</Include>
<Defines>WIN32</Defines>
@@ -107,6 +107,6 @@
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="$(CUDAPropsPath)\CUDA 11.8.targets" />
<Import Project="$(CUDAPropsPath)\CUDA 12.0.targets" />
</ImportGroup>
</Project>

View File

@@ -34,7 +34,7 @@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
<Import Project="$(CUDAPropsPath)\CUDA 11.8.props" />
<Import Project="$(CUDAPropsPath)\CUDA 12.0.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets">
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
@@ -63,7 +63,7 @@
<OutputFile>$(OutDir)/conjugateGradientUM.exe</OutputFile>
</Link>
<CudaCompile>
<CodeGeneration>compute_35,sm_35;compute_37,sm_37;compute_50,sm_50;compute_52,sm_52;compute_60,sm_60;compute_61,sm_61;compute_70,sm_70;compute_75,sm_75;compute_80,sm_80;compute_86,sm_86;compute_90,sm_90;</CodeGeneration>
<CodeGeneration>compute_50,sm_50;compute_52,sm_52;compute_60,sm_60;compute_61,sm_61;compute_70,sm_70;compute_75,sm_75;compute_80,sm_80;compute_86,sm_86;compute_90,sm_90;</CodeGeneration>
<AdditionalOptions>-Xcompiler "/wd 4819" --threads 0 </AdditionalOptions>
<Include>./;../../../Common</Include>
<Defines>WIN32</Defines>
@@ -103,6 +103,6 @@
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="$(CUDAPropsPath)\CUDA 11.8.targets" />
<Import Project="$(CUDAPropsPath)\CUDA 12.0.targets" />
</ImportGroup>
</Project>

View File

@@ -34,7 +34,7 @@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
<Import Project="$(CUDAPropsPath)\CUDA 11.8.props" />
<Import Project="$(CUDAPropsPath)\CUDA 12.0.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets">
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
@@ -63,7 +63,7 @@
<OutputFile>$(OutDir)/conjugateGradientUM.exe</OutputFile>
</Link>
<CudaCompile>
<CodeGeneration>compute_35,sm_35;compute_37,sm_37;compute_50,sm_50;compute_52,sm_52;compute_60,sm_60;compute_61,sm_61;compute_70,sm_70;compute_75,sm_75;compute_80,sm_80;compute_86,sm_86;compute_90,sm_90;</CodeGeneration>
<CodeGeneration>compute_50,sm_50;compute_52,sm_52;compute_60,sm_60;compute_61,sm_61;compute_70,sm_70;compute_75,sm_75;compute_80,sm_80;compute_86,sm_86;compute_90,sm_90;</CodeGeneration>
<AdditionalOptions>-Xcompiler "/wd 4819" --threads 0 </AdditionalOptions>
<Include>./;../../../Common</Include>
<Defines>WIN32</Defines>
@@ -103,6 +103,6 @@
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="$(CUDAPropsPath)\CUDA 11.8.targets" />
<Import Project="$(CUDAPropsPath)\CUDA 12.0.targets" />
</ImportGroup>
</Project>

View File

@@ -332,7 +332,7 @@ endif
ifeq ($(TARGET_ARCH),$(filter $(TARGET_ARCH),armv7l aarch64 sbsa))
SMS ?= 53 61 70 72 75 80 86 87 90
else
SMS ?= 35 37 50 52 60 61 70 75 80 86 90
SMS ?= 50 52 60 61 70 75 80 86 90
endif
ifeq ($(SMS),)

View File

@@ -27,7 +27,7 @@ cudaStreamCreateWithFlags, cudaStreamDestroy, cudaFree, cudaGetErrorName, cudaSe
## Prerequisites
Download and install the [CUDA Toolkit 11.8](https://developer.nvidia.com/cuda-downloads) for your corresponding platform.
Download and install the [CUDA Toolkit 12.0](https://developer.nvidia.com/cuda-downloads) for your corresponding platform.
## Build and Run

View File

@@ -332,7 +332,7 @@ endif
ifeq ($(TARGET_ARCH),$(filter $(TARGET_ARCH),armv7l aarch64 sbsa))
SMS ?= 53 61 70 72 75 80 86 87 90
else
SMS ?= 35 37 50 52 60 61 70 75 80 86 90
SMS ?= 50 52 60 61 70 75 80 86 90
endif
ifeq ($(SMS),)

View File

@@ -27,7 +27,7 @@ cudaStreamCreateWithFlags, cudaStreamDestroy, cudaFree, cudaGetErrorName, cudaSe
## Prerequisites
Download and install the [CUDA Toolkit 11.8](https://developer.nvidia.com/cuda-downloads) for your corresponding platform.
Download and install the [CUDA Toolkit 12.0](https://developer.nvidia.com/cuda-downloads) for your corresponding platform.
## Build and Run

View File

@@ -335,7 +335,7 @@ endif
ifeq ($(TARGET_ARCH),$(filter $(TARGET_ARCH),armv7l aarch64 sbsa))
SMS ?= 53 61 70 72 75 80 86 87 90
else
SMS ?= 35 37 50 52 60 61 70 75 80 86 90
SMS ?= 50 52 60 61 70 75 80 86 90
endif
ifeq ($(SMS),)

View File

@@ -27,7 +27,7 @@ aarch64
## Prerequisites
Download and install the [CUDA Toolkit 11.8](https://developer.nvidia.com/cuda-downloads) for your corresponding platform.
Download and install the [CUDA Toolkit 12.0](https://developer.nvidia.com/cuda-downloads) for your corresponding platform.
Make sure the dependencies mentioned in [Dependencies]() section above are installed.
## Build and Run

View File

@@ -289,7 +289,7 @@ LIBRARIES :=
ALL_CCFLAGS += --threads 0 --std=c++11
LIBRARIES += -lcusolver -lcublas -lcusparse
LIBRARIES += -lcusolver -lnvJitLink -lcublas -lcusparse
ifeq ($(SAMPLE_ENABLED),0)
EXEC ?= @echo "[@]"

View File

@@ -34,6 +34,7 @@
</keywords>
<libraries>
<library>cusolver</library>
<library>nvJitLink</library>
<library>cublas</library>
<library>cusparse</library>
</libraries>
@@ -55,8 +56,6 @@
<scope>1:CUDA Basic Topics</scope>
<scope>3:Linear Algebra</scope>
</scopes>
<sm-arch>sm35</sm-arch>
<sm-arch>sm37</sm-arch>
<sm-arch>sm50</sm-arch>
<sm-arch>sm52</sm-arch>
<sm-arch>sm53</sm-arch>

View File

@@ -10,7 +10,7 @@ Linear Algebra, CUSOLVER Library
## Supported SM Architectures
[SM 3.5 ](https://developer.nvidia.com/cuda-gpus) [SM 3.7 ](https://developer.nvidia.com/cuda-gpus) [SM 5.0 ](https://developer.nvidia.com/cuda-gpus) [SM 5.2 ](https://developer.nvidia.com/cuda-gpus) [SM 5.3 ](https://developer.nvidia.com/cuda-gpus) [SM 6.0 ](https://developer.nvidia.com/cuda-gpus) [SM 6.1 ](https://developer.nvidia.com/cuda-gpus) [SM 7.0 ](https://developer.nvidia.com/cuda-gpus) [SM 7.2 ](https://developer.nvidia.com/cuda-gpus) [SM 7.5 ](https://developer.nvidia.com/cuda-gpus) [SM 8.0 ](https://developer.nvidia.com/cuda-gpus) [SM 8.6 ](https://developer.nvidia.com/cuda-gpus) [SM 8.7 ](https://developer.nvidia.com/cuda-gpus) [SM 9.0 ](https://developer.nvidia.com/cuda-gpus)
[SM 5.0 ](https://developer.nvidia.com/cuda-gpus) [SM 5.2 ](https://developer.nvidia.com/cuda-gpus) [SM 5.3 ](https://developer.nvidia.com/cuda-gpus) [SM 6.0 ](https://developer.nvidia.com/cuda-gpus) [SM 6.1 ](https://developer.nvidia.com/cuda-gpus) [SM 7.0 ](https://developer.nvidia.com/cuda-gpus) [SM 7.2 ](https://developer.nvidia.com/cuda-gpus) [SM 7.5 ](https://developer.nvidia.com/cuda-gpus) [SM 8.0 ](https://developer.nvidia.com/cuda-gpus) [SM 8.6 ](https://developer.nvidia.com/cuda-gpus) [SM 8.7 ](https://developer.nvidia.com/cuda-gpus) [SM 9.0 ](https://developer.nvidia.com/cuda-gpus)
## Supported OSes
@@ -33,7 +33,7 @@ cudaMemcpy, cudaStreamDestroy, cudaFree, cudaDeviceSynchronize, cudaMemset, cuda
## Prerequisites
Download and install the [CUDA Toolkit 11.8](https://developer.nvidia.com/cuda-downloads) for your corresponding platform.
Download and install the [CUDA Toolkit 12.0](https://developer.nvidia.com/cuda-downloads) for your corresponding platform.
Make sure the dependencies mentioned in [Dependencies]() section above are installed.
## Build and Run

View File

@@ -38,7 +38,7 @@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
<Import Project="$(CUDAPropsPath)\CUDA 11.8.props" />
<Import Project="$(CUDAPropsPath)\CUDA 12.0.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets">
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
@@ -62,7 +62,7 @@
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<AdditionalDependencies>cusolver.lib;cublas.lib;cusparse.lib;cudart_static.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>cusolver.lib;nvJitLink.lib;cublas.lib;cusparse.lib;cudart_static.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(CudaToolkitLibDir);</AdditionalLibraryDirectories>
<OutputFile>$(OutDir)/cuSolverDn_LinearSolver.exe</OutputFile>
</Link>
@@ -109,6 +109,6 @@
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="$(CUDAPropsPath)\CUDA 11.8.targets" />
<Import Project="$(CUDAPropsPath)\CUDA 12.0.targets" />
</ImportGroup>
</Project>

View File

@@ -34,7 +34,7 @@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
<Import Project="$(CUDAPropsPath)\CUDA 11.8.props" />
<Import Project="$(CUDAPropsPath)\CUDA 12.0.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets">
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
@@ -58,7 +58,7 @@
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<AdditionalDependencies>cusolver.lib;cublas.lib;cusparse.lib;cudart_static.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>cusolver.lib;nvJitLink.lib;cublas.lib;cusparse.lib;cudart_static.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(CudaToolkitLibDir);</AdditionalLibraryDirectories>
<OutputFile>$(OutDir)/cuSolverDn_LinearSolver.exe</OutputFile>
</Link>
@@ -105,6 +105,6 @@
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="$(CUDAPropsPath)\CUDA 11.8.targets" />
<Import Project="$(CUDAPropsPath)\CUDA 12.0.targets" />
</ImportGroup>
</Project>

Some files were not shown because too many files have changed in this diff Show More