Add and update samples for cuda 11.1 support

This commit is contained in:
Mahesh Doijade
2020-09-15 23:45:56 +05:30
parent e6ce58fef4
commit cd76533c3f
453 changed files with 5227 additions and 9325 deletions

View File

@@ -255,6 +255,12 @@ ALL_CCFLAGS += $(addprefix -Xcompiler ,$(EXTRA_CCFLAGS))
SAMPLE_ENABLED := 1
# This sample is not supported on QNX
ifeq ($(TARGET_OS),qnx)
$(info >>> WARNING - shfl_scan is not supported on QNX - waiving sample <<<)
SAMPLE_ENABLED := 0
endif
ALL_LDFLAGS :=
ALL_LDFLAGS += $(ALL_CCFLAGS)
ALL_LDFLAGS += $(addprefix -Xlinker ,$(LDFLAGS))
@@ -266,11 +272,38 @@ LIBRARIES :=
################################################################################
#Detect if installed version of GCC supports required C++11
ifeq ($(TARGET_OS),linux)
empty :=
space := $(empty) $(empty)
GCCVERSIONSTRING := $(shell expr `$(HOST_COMPILER) -dumpversion`)
#Create version number without "."
GCCVERSION := $(shell expr `echo $(GCCVERSIONSTRING)` | cut -f1 -d.)
GCCVERSION += $(shell expr `echo $(GCCVERSIONSTRING)` | cut -f2 -d.)
GCCVERSION += $(shell expr `echo $(GCCVERSIONSTRING)` | cut -f3 -d.)
# Make sure the version number has at least 3 decimals
GCCVERSION += 00
# Remove spaces from the version number
GCCVERSION := $(subst $(space),$(empty),$(GCCVERSION))
# Crop the version number to 3 decimals.
GCCVERSION := $(shell expr `echo $(GCCVERSION)` | cut -b1-3)
#$(warning $(GCCVERSION))
IS_MIN_VERSION := $(shell expr `echo $(GCCVERSION)` \>= 470)
ifeq ($(IS_MIN_VERSION), 1)
$(info >>> GCC Version is greater or equal to 4.7.0 <<<)
else
$(info >>> Waiving build. Minimum GCC version required is 4.7.0<<<)
SAMPLE_ENABLED := 0
endif
endif
# Gencode arguments
ifeq ($(TARGET_ARCH),$(filter $(TARGET_ARCH),armv7l aarch64))
SMS ?= 35 37 50 52 60 61 70 72 75 80
SMS ?= 35 37 50 52 60 61 70 72 75 80 86
else
SMS ?= 35 37 50 52 60 61 70 75 80
SMS ?= 35 37 50 52 60 61 70 75 80 86
endif
ifeq ($(SMS),)
@@ -289,7 +322,7 @@ GENCODE_FLAGS += -gencode arch=compute_$(HIGHEST_SM),code=compute_$(HIGHEST_SM)
endif
endif
ALL_CCFLAGS += -O3
ALL_CCFLAGS += --std=c++11 -O3
ifeq ($(SAMPLE_ENABLED),0)
EXEC ?= @echo "[@]"

View File

@@ -3,6 +3,7 @@
<entry>
<name>shfl_scan</name>
<cflags>
<flag>--std=c++11</flag>
<flag>-O3</flag>
</cflags>
<description><![CDATA[This example demonstrates how to use the shuffle intrinsic __shfl_up_sync to perform a scan operation across a thread block. ]]></description>
@@ -18,6 +19,7 @@
</keyconcepts>
<keywords>
<keyword>GPGPU</keyword>
<keyword>CPP11</keyword>
<keyword>CUDA</keyword>
<keyword>scan</keyword>
<keyword>parallel prefix sum</keyword>
@@ -29,6 +31,9 @@
</librarypaths>
<nsight_eclipse>true</nsight_eclipse>
<primary_file>shfl_scan.cu</primary_file>
<required_dependencies>
<dependency>CPP11</dependency>
</required_dependencies>
<scopes>
<scope>1:CUDA Advanced Topics</scope>
<scope>1:Data-Parallel Algorithms</scope>

View File

@@ -20,9 +20,13 @@ x86_64, ppc64le, armv7l, aarch64
## CUDA APIs involved
## Dependencies needed to build/run
[CPP11](../../README.md#cpp11)
## Prerequisites
Download and install the [CUDA Toolkit 11.0](https://developer.nvidia.com/cuda-downloads) for your corresponding platform.
Download and install the [CUDA Toolkit 11.1](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

@@ -24,76 +24,68 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <cooperative_groups.h>
namespace cg = cooperative_groups;
// Utility function to extract unsigned chars from an
// unsigned integer
__device__ uchar4 int_to_uchar4(unsigned int in) {
uchar4 bytes;
bytes.x = in & 0x000000ff >> 0;
bytes.y = in & 0x0000ff00 >> 8;
bytes.z = in & 0x00ff0000 >> 16;
bytes.w = in & 0xff000000 >> 24;
return bytes;
__device__ uchar4 uint_to_uchar4(const unsigned int in) {
return make_uchar4((in & 0x000000ff) >> 0, (in & 0x0000ff00) >> 8,
(in & 0x00ff0000) >> 16, (in & 0xff000000) >> 24);
}
// This function demonstrates some uses of the shuffle instruction
// in the generation of an integral image (also
// called a summed area table)
// The approach is two pass, a horizontal (scanline) then a vertical
// (column) pass.
// This is the horizontal pass kernel.
__global__ void shfl_intimage_rows(uint4 *img, uint4 *integral_image) {
__shared__ int sums[128];
// Utility for dealing with vector data at different levels.
struct packed_result {
uint4 x, y, z, w;
};
int id = threadIdx.x;
// pointer to head of current scanline
uint4 *scanline = &img[blockIdx.x * 120];
uint4 data;
data = scanline[id];
int result[16];
int sum;
unsigned int lane_id = id % warpSize;
int warp_id = threadIdx.x / warpSize;
__device__ packed_result get_prefix_sum(const uint4 &data,
const cg::thread_block &cta) {
const auto tile = cg::tiled_partition<32>(cta);
uchar4 a = int_to_uchar4(data.x);
uchar4 b = int_to_uchar4(data.y);
uchar4 c = int_to_uchar4(data.z);
uchar4 d = int_to_uchar4(data.w);
__shared__ unsigned int sums[128];
const unsigned int lane_id = tile.thread_rank();
const unsigned int warp_id = tile.meta_group_rank();
result[0] = a.x;
result[1] = a.x + a.y;
result[2] = a.x + a.y + a.z;
result[3] = a.x + a.y + a.z + a.w;
unsigned int result[16] = {};
{
const uchar4 a = uint_to_uchar4(data.x);
const uchar4 b = uint_to_uchar4(data.y);
const uchar4 c = uint_to_uchar4(data.z);
const uchar4 d = uint_to_uchar4(data.w);
result[4] = b.x;
result[5] = b.x + b.y;
result[6] = b.x + b.y + b.z;
result[7] = b.x + b.y + b.z + b.w;
result[0] = a.x;
result[1] = a.x + a.y;
result[2] = a.x + a.y + a.z;
result[3] = a.x + a.y + a.z + a.w;
result[8] = c.x;
result[9] = c.x + c.y;
result[10] = c.x + c.y + c.z;
result[11] = c.x + c.y + c.z + c.w;
result[4] = b.x;
result[5] = b.x + b.y;
result[6] = b.x + b.y + b.z;
result[7] = b.x + b.y + b.z + b.w;
result[12] = d.x;
result[13] = d.x + d.y;
result[14] = d.x + d.y + d.z;
result[15] = d.x + d.y + d.z + d.w;
result[8] = c.x;
result[9] = c.x + c.y;
result[10] = c.x + c.y + c.z;
result[11] = c.x + c.y + c.z + c.w;
result[12] = d.x;
result[13] = d.x + d.y;
result[14] = d.x + d.y + d.z;
result[15] = d.x + d.y + d.z + d.w;
}
#pragma unroll
for (int i = 4; i <= 7; i++) result[i] += result[3];
for (unsigned int i = 4; i <= 7; i++) result[i] += result[3];
#pragma unroll
for (int i = 8; i <= 11; i++) result[i] += result[7];
for (unsigned int i = 8; i <= 11; i++) result[i] += result[7];
#pragma unroll
for (unsigned int i = 12; i <= 15; i++) result[i] += result[11];
for (int i = 12; i <= 15; i++) result[i] += result[11];
sum = result[15];
unsigned int sum = result[15];
// the prefix sum for each thread's 16 value is computed,
// now the final sums (result[15]) need to be shared
@@ -101,17 +93,15 @@ __global__ void shfl_intimage_rows(uint4 *img, uint4 *integral_image) {
// the __shfl_up() instruction is used and a shuffle scan
// operation is performed to distribute the sums to the correct
// threads
#pragma unroll
for (int i = 1; i < 32; i *= 2) {
unsigned int mask = 0xffffffff;
int n = __shfl_up_sync(mask, sum, i, 32);
#pragma unroll
for (unsigned int i = 1; i < 32; i *= 2) {
const unsigned int n = tile.shfl_up(sum, i);
if (lane_id >= i) {
#pragma unroll
for (int i = 0; i < 16; i++) {
result[i] += n;
for (unsigned int j = 0; j < 16; j++) {
result[j] += n;
}
sum += n;
@@ -126,19 +116,18 @@ __global__ void shfl_intimage_rows(uint4 *img, uint4 *integral_image) {
// The results are uniformly added back to the warps.
// last thread in the warp holding sum of the warp
// places that in shared
if (threadIdx.x % warpSize == warpSize - 1) {
if (tile.thread_rank() == (tile.size() - 1)) {
sums[warp_id] = result[15];
}
__syncthreads();
if (warp_id == 0) {
int warp_sum = sums[lane_id];
#pragma unroll
unsigned int warp_sum = sums[lane_id];
for (int i = 1; i <= 32; i *= 2) {
unsigned int mask = 0xffffffff;
int n = __shfl_up_sync(mask, warp_sum, i, 32);
#pragma unroll
for (unsigned int i = 1; i <= 16; i *= 2) {
const unsigned int n = tile.shfl_up(warp_sum, i);
if (lane_id >= i) warp_sum += n;
}
@@ -148,18 +137,52 @@ __global__ void shfl_intimage_rows(uint4 *img, uint4 *integral_image) {
__syncthreads();
int blockSum = 0;
// fold in unused warp
if (warp_id > 0) {
blockSum = sums[warp_id - 1];
#pragma unroll
const unsigned int blockSum = sums[warp_id - 1];
for (int i = 0; i < 16; i++) {
#pragma unroll
for (unsigned int i = 0; i < 16; i++) {
result[i] += blockSum;
}
}
packed_result out;
memcpy(&out, result, sizeof(out));
return out;
}
// This function demonstrates some uses of the shuffle instruction
// in the generation of an integral image (also
// called a summed area table)
// The approach is two pass, a horizontal (scanline) then a vertical
// (column) pass.
// This is the horizontal pass kernel.
__global__ void shfl_intimage_rows(const uint4 *img, uint4 *integral_image) {
const auto cta = cg::this_thread_block();
const auto tile = cg::tiled_partition<32>(cta);
const unsigned int id = threadIdx.x;
// pointer to head of current scanline
const uint4 *scanline = &img[blockIdx.x * 120];
packed_result result = get_prefix_sum(scanline[id], cta);
// This access helper allows packed_result to stay optimized as registers
// rather than spill to stack
auto idxToElem = [&result](unsigned int idx) -> const uint4 {
switch (idx) {
case 0:
return result.x;
case 1:
return result.y;
case 2:
return result.z;
case 3:
return result.w;
}
return {};
};
// assemble result
// Each thread has 16 values to write, which are
// now integer data (to avoid overflow). Instead of
@@ -170,131 +193,58 @@ __global__ void shfl_intimage_rows(uint4 *img, uint4 *integral_image) {
// consecutive data to be written so larger contiguous
// segments can be assembled for writing.
/*
For example data that needs to be written as
For example data that needs to be written as
GMEM[16] <- x0 x1 x2 x3 y0 y1 y2 y3 z0 z1 z2 z3 w0 w1 w2 w3
but is stored in registers (r0..r3), in four threads (0..3) as:
GMEM[16] <- x0 x1 x2 x3 y0 y1 y2 y3 z0 z1 z2 z3 w0 w1 w2 w3
but is stored in registers (r0..r3), in four threads (0..3) as:
threadId 0 1 2 3
r0 x0 y0 z0 w0
r1 x1 y1 z1 w1
r2 x2 y2 z2 w2
r3 x3 y3 z3 w3
threadId 0 1 2 3
r0 x0 y0 z0 w0
r1 x1 y1 z1 w1
r2 x2 y2 z2 w2
r3 x3 y3 z3 w3
after apply __shfl_xor operations to move data between registers r1..r3:
after apply __shfl_xor operations to move data between registers r1..r3:
threadId 00 01 10 11
x0 y0 z0 w0
xor(01)->y1 x1 w1 z1
xor(10)->z2 w2 x2 y2
xor(11)->w3 z3 y3 x3
threadId 00 01 10 11
x0 y0 z0 w0
xor(01)->y1 x1 w1 z1
xor(10)->z2 w2 x2 y2
xor(11)->w3 z3 y3 x3
and now x0..x3, and z0..z3 can be written out in order by all threads.
and now x0..x3, and z0..z3 can be written out in order by all threads.
In the current code, each register above is actually representing
four integers to be written as uint4's to GMEM.
In the current code, each register above is actually representing
four integers to be written as uint4's to GMEM.
*/
unsigned int mask = 0xffffffff;
uint4 output;
result[4] = __shfl_xor_sync(mask, result[4], 1, 32);
result[5] = __shfl_xor_sync(mask, result[5], 1, 32);
result[6] = __shfl_xor_sync(mask, result[6], 1, 32);
result[7] = __shfl_xor_sync(mask, result[7], 1, 32);
const unsigned int idMask = id & 3;
const unsigned int idSwizzle = (id + 2) & 3;
const unsigned int idShift = (id >> 2) << 4;
const unsigned int blockOffset = blockIdx.x * 480;
result[8] = __shfl_xor_sync(mask, result[8], 2, 32);
result[9] = __shfl_xor_sync(mask, result[9], 2, 32);
result[10] = __shfl_xor_sync(mask, result[10], 2, 32);
result[11] = __shfl_xor_sync(mask, result[11], 2, 32);
// Use CG tile to warp shuffle vector types
result.y = tile.shfl_xor(result.y, 1);
result.z = tile.shfl_xor(result.z, 2);
result.w = tile.shfl_xor(result.w, 3);
result[12] = __shfl_xor_sync(mask, result[12], 3, 32);
result[13] = __shfl_xor_sync(mask, result[13], 3, 32);
result[14] = __shfl_xor_sync(mask, result[14], 3, 32);
result[15] = __shfl_xor_sync(mask, result[15], 3, 32);
// First batch
integral_image[blockOffset + idMask + idShift] = idxToElem(idMask);
// Second batch offset by 2
integral_image[blockOffset + idSwizzle + idShift + 8] = idxToElem(idSwizzle);
if (threadIdx.x % 4 == 0) {
output = make_uint4(result[0], result[1], result[2], result[3]);
}
if (threadIdx.x % 4 == 1) {
output = make_uint4(result[4], result[5], result[6], result[7]);
}
if (threadIdx.x % 4 == 2) {
output = make_uint4(result[8], result[9], result[10], result[11]);
}
if (threadIdx.x % 4 == 3) {
output = make_uint4(result[12], result[13], result[14], result[15]);
}
integral_image[blockIdx.x * 480 + threadIdx.x % 4 + (threadIdx.x / 4) * 16] =
output;
if (threadIdx.x % 4 == 2) {
output = make_uint4(result[0], result[1], result[2], result[3]);
}
if (threadIdx.x % 4 == 3) {
output = make_uint4(result[4], result[5], result[6], result[7]);
}
if (threadIdx.x % 4 == 0) {
output = make_uint4(result[8], result[9], result[10], result[11]);
}
if (threadIdx.x % 4 == 1) {
output = make_uint4(result[12], result[13], result[14], result[15]);
}
integral_image[blockIdx.x * 480 + (threadIdx.x + 2) % 4 +
(threadIdx.x / 4) * 16 + 8] = output;
// continuing from the above example,
// this use of __shfl_xor() places the y0..y3 and w0..w3 data
// in order.
#pragma unroll
result.x = tile.shfl_xor(result.x, 1);
result.y = tile.shfl_xor(result.y, 1);
result.z = tile.shfl_xor(result.z, 1);
result.w = tile.shfl_xor(result.w, 1);
for (int i = 0; i < 16; i++) {
result[i] = __shfl_xor_sync(mask, result[i], 1, 32);
}
if (threadIdx.x % 4 == 0) {
output = make_uint4(result[0], result[1], result[2], result[3]);
}
if (threadIdx.x % 4 == 1) {
output = make_uint4(result[4], result[5], result[6], result[7]);
}
if (threadIdx.x % 4 == 2) {
output = make_uint4(result[8], result[9], result[10], result[11]);
}
if (threadIdx.x % 4 == 3) {
output = make_uint4(result[12], result[13], result[14], result[15]);
}
integral_image[blockIdx.x * 480 + threadIdx.x % 4 + (threadIdx.x / 4) * 16 +
4] = output;
if (threadIdx.x % 4 == 2) {
output = make_uint4(result[0], result[1], result[2], result[3]);
}
if (threadIdx.x % 4 == 3) {
output = make_uint4(result[4], result[5], result[6], result[7]);
}
if (threadIdx.x % 4 == 0) {
output = make_uint4(result[8], result[9], result[10], result[11]);
}
if (threadIdx.x % 4 == 1) {
output = make_uint4(result[12], result[13], result[14], result[15]);
}
integral_image[blockIdx.x * 480 + (threadIdx.x + 2) % 4 +
(threadIdx.x / 4) * 16 + 12] = output;
// First batch
integral_image[blockOffset + idMask + idShift + 4] = idxToElem(idMask);
// Second batch offset by 2
integral_image[blockOffset + idSwizzle + idShift + 12] = idxToElem(idSwizzle);
}
// This kernel computes columnwise prefix sums. When the data input is

View File

@@ -1,20 +0,0 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shfl_scan", "shfl_scan_vs2012.vcxproj", "{997E0757-EA74-4A4E-A0FC-47D8C8831A15}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{997E0757-EA74-4A4E-A0FC-47D8C8831A15}.Debug|x64.ActiveCfg = Debug|x64
{997E0757-EA74-4A4E-A0FC-47D8C8831A15}.Debug|x64.Build.0 = Debug|x64
{997E0757-EA74-4A4E-A0FC-47D8C8831A15}.Release|x64.ActiveCfg = Release|x64
{997E0757-EA74-4A4E-A0FC-47D8C8831A15}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

@@ -1,108 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<CUDAPropsPath Condition="'$(CUDAPropsPath)'==''">$(VCTargetsPath)\BuildCustomizations</CUDAPropsPath>
</PropertyGroup>
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{997E0757-EA74-4A4E-A0FC-47D8C8831A15}</ProjectGuid>
<RootNamespace>shfl_scan_vs2012</RootNamespace>
<ProjectName>shfl_scan</ProjectName>
<CudaToolkitCustomDir />
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup>
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Debug'">
<UseDebugLibraries>true</UseDebugLibraries>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Release'">
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
<Import Project="$(CUDAPropsPath)\CUDA 11.0.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets">
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<IntDir>$(Platform)/$(Configuration)/</IntDir>
<IncludePath>$(IncludePath)</IncludePath>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules />
<CodeAnalysisRuleAssemblies />
</PropertyGroup>
<PropertyGroup Condition="'$(Platform)'=='x64'">
<OutDir>../../bin/win64/$(Configuration)/</OutDir>
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PreprocessorDefinitions>WIN32;_MBCS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>./;$(CudaToolkitDir)/include;../../Common;</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<AdditionalDependencies>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)/shfl_scan.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;</CodeGeneration>
<AdditionalOptions>-Xcompiler "/wd 4819" %(AdditionalOptions)</AdditionalOptions>
<Include>./;../../Common</Include>
<Defines>WIN32</Defines>
</CudaCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)'=='Debug'">
<ClCompile>
<Optimization>Disabled</Optimization>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
</Link>
<CudaCompile>
<Runtime>MTd</Runtime>
<TargetMachinePlatform>64</TargetMachinePlatform>
</CudaCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)'=='Release'">
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<GenerateDebugInformation>false</GenerateDebugInformation>
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
</Link>
<CudaCompile>
<Runtime>MT</Runtime>
<TargetMachinePlatform>64</TargetMachinePlatform>
</CudaCompile>
</ItemDefinitionGroup>
<ItemGroup>
<CudaCompile Include="shfl_scan.cu" />
<ClInclude Include="util.h" />
<None Include="shfl_integral_image.cuh" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="$(CUDAPropsPath)\CUDA 11.0.targets" />
</ImportGroup>
</Project>

View File

@@ -1,20 +0,0 @@

Microsoft Visual Studio Solution File, Format Version 13.00
# Visual Studio 2013
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shfl_scan", "shfl_scan_vs2013.vcxproj", "{997E0757-EA74-4A4E-A0FC-47D8C8831A15}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{997E0757-EA74-4A4E-A0FC-47D8C8831A15}.Debug|x64.ActiveCfg = Debug|x64
{997E0757-EA74-4A4E-A0FC-47D8C8831A15}.Debug|x64.Build.0 = Debug|x64
{997E0757-EA74-4A4E-A0FC-47D8C8831A15}.Release|x64.ActiveCfg = Release|x64
{997E0757-EA74-4A4E-A0FC-47D8C8831A15}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

@@ -1,108 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<CUDAPropsPath Condition="'$(CUDAPropsPath)'==''">$(VCTargetsPath)\BuildCustomizations</CUDAPropsPath>
</PropertyGroup>
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{997E0757-EA74-4A4E-A0FC-47D8C8831A15}</ProjectGuid>
<RootNamespace>shfl_scan_vs2013</RootNamespace>
<ProjectName>shfl_scan</ProjectName>
<CudaToolkitCustomDir />
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup>
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Debug'">
<UseDebugLibraries>true</UseDebugLibraries>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Release'">
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
<Import Project="$(CUDAPropsPath)\CUDA 11.0.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets">
<Import Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<IntDir>$(Platform)/$(Configuration)/</IntDir>
<IncludePath>$(IncludePath)</IncludePath>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules />
<CodeAnalysisRuleAssemblies />
</PropertyGroup>
<PropertyGroup Condition="'$(Platform)'=='x64'">
<OutDir>../../bin/win64/$(Configuration)/</OutDir>
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PreprocessorDefinitions>WIN32;_MBCS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>./;$(CudaToolkitDir)/include;../../Common;</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<AdditionalDependencies>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)/shfl_scan.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;</CodeGeneration>
<AdditionalOptions>-Xcompiler "/wd 4819" %(AdditionalOptions)</AdditionalOptions>
<Include>./;../../Common</Include>
<Defines>WIN32</Defines>
</CudaCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)'=='Debug'">
<ClCompile>
<Optimization>Disabled</Optimization>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
</Link>
<CudaCompile>
<Runtime>MTd</Runtime>
<TargetMachinePlatform>64</TargetMachinePlatform>
</CudaCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)'=='Release'">
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<GenerateDebugInformation>false</GenerateDebugInformation>
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
</Link>
<CudaCompile>
<Runtime>MT</Runtime>
<TargetMachinePlatform>64</TargetMachinePlatform>
</CudaCompile>
</ItemDefinitionGroup>
<ItemGroup>
<CudaCompile Include="shfl_scan.cu" />
<ClInclude Include="util.h" />
<None Include="shfl_integral_image.cuh" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="$(CUDAPropsPath)\CUDA 11.0.targets" />
</ImportGroup>
</Project>

View File

@@ -33,7 +33,7 @@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
<Import Project="$(CUDAPropsPath)\CUDA 11.0.props" />
<Import Project="$(CUDAPropsPath)\CUDA 11.1.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 @@
<OutputFile>$(OutDir)/shfl_scan.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;</CodeGeneration>
<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;</CodeGeneration>
<AdditionalOptions>-Xcompiler "/wd 4819" %(AdditionalOptions)</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.0.targets" />
<Import Project="$(CUDAPropsPath)\CUDA 11.1.targets" />
</ImportGroup>
</Project>

View File

@@ -38,7 +38,7 @@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
<Import Project="$(CUDAPropsPath)\CUDA 11.0.props" />
<Import Project="$(CUDAPropsPath)\CUDA 11.1.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)/shfl_scan.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;</CodeGeneration>
<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;</CodeGeneration>
<AdditionalOptions>-Xcompiler "/wd 4819" %(AdditionalOptions)</AdditionalOptions>
<Include>./;../../Common</Include>
<Defines>WIN32</Defines>
@@ -108,6 +108,6 @@
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="$(CUDAPropsPath)\CUDA 11.0.targets" />
<Import Project="$(CUDAPropsPath)\CUDA 11.1.targets" />
</ImportGroup>
</Project>

View File

@@ -34,7 +34,7 @@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
<Import Project="$(CUDAPropsPath)\CUDA 11.0.props" />
<Import Project="$(CUDAPropsPath)\CUDA 11.1.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)/shfl_scan.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;</CodeGeneration>
<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;</CodeGeneration>
<AdditionalOptions>-Xcompiler "/wd 4819" %(AdditionalOptions)</AdditionalOptions>
<Include>./;../../Common</Include>
<Defines>WIN32</Defines>
@@ -104,6 +104,6 @@
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="$(CUDAPropsPath)\CUDA 11.0.targets" />
<Import Project="$(CUDAPropsPath)\CUDA 11.1.targets" />
</ImportGroup>
</Project>