Skip to content

Commit

Permalink
Merge branch 'release/19.21.0.20210302'
Browse files Browse the repository at this point in the history
  • Loading branch information
takuya-takeuchi committed Mar 1, 2021
2 parents 3c64e6e + cfd5258 commit 8c1cbab
Show file tree
Hide file tree
Showing 33 changed files with 598 additions and 598 deletions.
171 changes: 171 additions & 0 deletions CreateSymlink.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@
#***************************************
#Arguments
#%1: CUDA (92,100,101,102,110,111)
#***************************************
Param([Parameter(
Mandatory=$True,
Position = 1
)][string]
$CUDA
)

Set-StrictMode -Version Latest

# For windows

# For DlibDotNet.CUDA92
$tmp92 = New-Object 'System.Collections.Generic.List[string]'
$tmp92.Add("$env:CUDA_PATH_V9_2\bin\cublas64_92.dll")
$tmp92.Add("$env:CUDA_PATH_V9_2\bin\cudnn64_7.dll")
$tmp92.Add("$env:CUDA_PATH_V9_2\bin\curand64_92.dll")
$tmp92.Add("$env:CUDA_PATH_V9_2\bin\cusolver64_92.dll")

# For DlibDotNet.CUDA100
$tmp100 = New-Object 'System.Collections.Generic.List[string]'
$tmp100.Add("$env:CUDA_PATH_V10_0\bin\cublas64_100.dll")
$tmp100.Add("$env:CUDA_PATH_V10_0\bin\cudnn64_7.dll")
$tmp100.Add("$env:CUDA_PATH_V10_0\bin\curand64_100.dll")
$tmp100.Add("$env:CUDA_PATH_V10_0\bin\cusolver64_100.dll")

# For DlibDotNet.CUDA101
$tmp101 = New-Object 'System.Collections.Generic.List[string]'
$tmp101.Add("$env:CUDA_PATH_V10_1\bin\cublas64_10.dll")
$tmp101.Add("$env:CUDA_PATH_V10_1\bin\cudnn64_7.dll")
$tmp101.Add("$env:CUDA_PATH_V10_1\bin\curand64_10.dll")
$tmp101.Add("$env:CUDA_PATH_V10_1\bin\cusolver64_10.dll")

# For DlibDotNet.CUDA102
$tmp102 = New-Object 'System.Collections.Generic.List[string]'
$tmp102.Add("$env:CUDA_PATH_V10_2\bin\cublas64_10.dll")
$tmp102.Add("$env:CUDA_PATH_V10_2\bin\cudnn64_7.dll")
$tmp102.Add("$env:CUDA_PATH_V10_2\bin\curand64_10.dll")
$tmp102.Add("$env:CUDA_PATH_V10_2\bin\cusolver64_10.dll")

# For DlibDotNet.CUDA110
$tmp110 = New-Object 'System.Collections.Generic.List[string]'
$tmp110.Add("$env:CUDA_PATH_V11_0\bin\cublas64_11.dll")
$tmp110.Add("$env:CUDA_PATH_V11_0\bin\cublasLt64_11.dll")
$tmp110.Add("$env:CUDA_PATH_V11_0\bin\cudnn_adv_infer64_8.dll")
$tmp110.Add("$env:CUDA_PATH_V11_0\bin\cudnn_adv_train64_8.dll")
$tmp110.Add("$env:CUDA_PATH_V11_0\bin\cudnn_cnn_infer64_8.dll")
$tmp110.Add("$env:CUDA_PATH_V11_0\bin\cudnn_cnn_train64_8.dll")
$tmp110.Add("$env:CUDA_PATH_V11_0\bin\cudnn_ops_infer64_8.dll")
$tmp110.Add("$env:CUDA_PATH_V11_0\bin\cudnn_ops_train64_8.dll")
$tmp110.Add("$env:CUDA_PATH_V11_0\bin\cudnn64_8.dll")
$tmp110.Add("$env:CUDA_PATH_V11_0\bin\curand64_10.dll")
$tmp110.Add("$env:CUDA_PATH_V11_0\bin\cusolver64_10.dll")

# For DlibDotNet.CUDA111
$tmp111 = New-Object 'System.Collections.Generic.List[string]'
$tmp111.Add("$env:CUDA_PATH_V11_1\bin\cublas64_11.dll")
$tmp111.Add("$env:CUDA_PATH_V11_1\bin\cublasLt64_11.dll")
$tmp111.Add("$env:CUDA_PATH_V11_1\bin\cudnn_adv_infer64_8.dll")
$tmp111.Add("$env:CUDA_PATH_V11_1\bin\cudnn_adv_train64_8.dll")
$tmp111.Add("$env:CUDA_PATH_V11_1\bin\cudnn_cnn_infer64_8.dll")
$tmp111.Add("$env:CUDA_PATH_V11_1\bin\cudnn_cnn_train64_8.dll")
$tmp111.Add("$env:CUDA_PATH_V11_1\bin\cudnn_ops_infer64_8.dll")
$tmp111.Add("$env:CUDA_PATH_V11_1\bin\cudnn_ops_train64_8.dll")
$tmp111.Add("$env:CUDA_PATH_V11_1\bin\cudnn64_8.dll")
$tmp111.Add("$env:CUDA_PATH_V11_1\bin\curand64_10.dll")
$tmp111.Add("$env:CUDA_PATH_V11_1\bin\cusolver64_11.dll")

$BuildTargets = @()
$BuildTargets += New-Object PSObject -Property @{Package = "92"; Dependencies = $tmp92 }
$BuildTargets += New-Object PSObject -Property @{Package = "100"; Dependencies = $tmp100 }
$BuildTargets += New-Object PSObject -Property @{Package = "101"; Dependencies = $tmp101 }
$BuildTargets += New-Object PSObject -Property @{Package = "102"; Dependencies = $tmp102 }
$BuildTargets += New-Object PSObject -Property @{Package = "110"; Dependencies = $tmp110 }
$BuildTargets += New-Object PSObject -Property @{Package = "111"; Dependencies = $tmp111 }

# Store current directory
$DlibDotNetRoot = $PSScriptRoot

$Libraries = $Null
foreach ($Target in $BuildTargets)
{
if ($Target.Package -eq $CUDA)
{
$Libraries = $Target.Dependencies
break
}
}

if ($Libraries -eq $Null)
{
Write-Host "${CUDA} is invalid parameter" -ForegroundColor Red
exit
}

$BuildConfiguration = "Release"

$BuildLibraryWindowsHash =
@{
"DlibDotNet.Native" = (Join-Path $BuildConfiguration "DlibDotNetNative.dll");
"DlibDotNet.Native.Dnn" = (Join-Path $BuildConfiguration "DlibDotNetNativeDnn.dll")
}

$SourceDir = Join-Path $DlibDotNetRoot src
$BuildDir = "build_win_desktop_cuda-${CUDA}_x64"

$Files = Get-ChildItem -Recurse -Name -include *.csproj

$re = New-Object regex("<TargetFramework>(?<Version>[^<]+)</TargetFramework>")
foreach ($File in $Files)
{
$ProjectRoot = Split-Path ${file} -Parent
$ProjectRoot = Join-Path ${DlibDotNetRoot} ${ProjectRoot}

# check framework version
$ProjectFile = Get-Content ${file}
$Match = $re.Matches(${ProjectFile})
if ($Match -ne $Null)
{
$Version = $Match.Groups[1].Value

$Configurations = @( "Release", "Debug" )
foreach ($Configuration in $Configurations)
{
$TargetDir = Join-Path $ProjectRoot bin | `
Join-Path -ChildPath $Configuration | `
Join-Path -ChildPath $Version

if (!(Test-Path $TargetDir))
{
New-Item $TargetDir -ItemType Directory | Out-Null
}

foreach ($Library in $Libraries)
{
$FileName = Split-Path $Library -Leaf
$FilePath = Join-Path $TargetDir $FileName

if ((Test-Path $FilePath))
{
Remove-Item $FilePath
}

New-Item -Value "$Library" -Path "$TargetDir" -Name "$FileName" -ItemType SymbolicLink > $null
}

foreach ($key in $BuildLibraryWindowsHash.keys)
{
$SrcDir = Join-Path $SourceDir $key | `
Join-Path -ChildPath $BuildDir
$Dll = $BuildLibraryWindowsHash[$key]
$FileName = Split-Path $Dll -Leaf
$FilePath = Join-Path $TargetDir $FileName
$Library = Join-Path $SrcDir $Dll

if ((Test-Path $FilePath))
{
Remove-Item $FilePath
}

New-Item -Value "$Library" -Path "$TargetDir" -Name "$FileName" -ItemType SymbolicLink > $null
}
}
}
}

# Move to Root directory
Set-Location -Path $DlibDotNetRoot
24 changes: 0 additions & 24 deletions DlibDotNet.json

This file was deleted.

38 changes: 0 additions & 38 deletions DlibDotNet.sln
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "3DPointCloud", "examples\3D
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Surf", "examples\Surf\Surf.csproj", "{6E027771-5500-4555-822C-C7FE6AC8709D}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DlibDotNet.Extensions", "src\DlibDotNet.Extensions\DlibDotNet.Extensions.csproj", "{D3BFF103-53CB-46DC-A0E8-05A01E11099B}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "WinForms", "WinForms", "{4082257D-FC8E-4D37-8489-89AAFC9D4A38}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FaceDetection", "examples\WinForms\FaceDetection\FaceDetection.csproj", "{1523DA42-DB7E-47B5-8AE6-305100F3891A}"
Expand All @@ -53,8 +51,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FaceLandmarkDetection", "ex
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FaceLandmarkDetection", "examples\WPF\FaceLandmarkDetection\FaceLandmarkDetection.csproj", "{9575AC94-3760-483F-9403-A77E7CFE8F47}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DlibDotNet.Extensions.Tests", "test\DlibDotNet.Extensions.Tests\DlibDotNet.Extensions.Tests.csproj", "{2A75C8B3-5122-4E7E-A0CF-A0AD5FFA60B2}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DnnFaceRecognition", "examples\DnnFaceRecognition\DnnFaceRecognition.csproj", "{C6EFE2AC-63BD-4574-B4A1-9AC80CA5AD2E}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DnnMmodFaceDetection", "examples\DnnMmodFaceDetection\DnnMmodFaceDetection.csproj", "{A6302463-CC32-4060-B8DF-466479046038}"
Expand Down Expand Up @@ -383,22 +379,6 @@ Global
{6E027771-5500-4555-822C-C7FE6AC8709D}.Release|x64.Build.0 = Release|Any CPU
{6E027771-5500-4555-822C-C7FE6AC8709D}.Release|x86.ActiveCfg = Release|Any CPU
{6E027771-5500-4555-822C-C7FE6AC8709D}.Release|x86.Build.0 = Release|Any CPU
{D3BFF103-53CB-46DC-A0E8-05A01E11099B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D3BFF103-53CB-46DC-A0E8-05A01E11099B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D3BFF103-53CB-46DC-A0E8-05A01E11099B}.Debug|ARM.ActiveCfg = Debug|Any CPU
{D3BFF103-53CB-46DC-A0E8-05A01E11099B}.Debug|ARM.Build.0 = Debug|Any CPU
{D3BFF103-53CB-46DC-A0E8-05A01E11099B}.Debug|x64.ActiveCfg = Debug|Any CPU
{D3BFF103-53CB-46DC-A0E8-05A01E11099B}.Debug|x64.Build.0 = Debug|Any CPU
{D3BFF103-53CB-46DC-A0E8-05A01E11099B}.Debug|x86.ActiveCfg = Debug|Any CPU
{D3BFF103-53CB-46DC-A0E8-05A01E11099B}.Debug|x86.Build.0 = Debug|Any CPU
{D3BFF103-53CB-46DC-A0E8-05A01E11099B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D3BFF103-53CB-46DC-A0E8-05A01E11099B}.Release|Any CPU.Build.0 = Release|Any CPU
{D3BFF103-53CB-46DC-A0E8-05A01E11099B}.Release|ARM.ActiveCfg = Release|Any CPU
{D3BFF103-53CB-46DC-A0E8-05A01E11099B}.Release|ARM.Build.0 = Release|Any CPU
{D3BFF103-53CB-46DC-A0E8-05A01E11099B}.Release|x64.ActiveCfg = Release|Any CPU
{D3BFF103-53CB-46DC-A0E8-05A01E11099B}.Release|x64.Build.0 = Release|Any CPU
{D3BFF103-53CB-46DC-A0E8-05A01E11099B}.Release|x86.ActiveCfg = Release|Any CPU
{D3BFF103-53CB-46DC-A0E8-05A01E11099B}.Release|x86.Build.0 = Release|Any CPU
{1523DA42-DB7E-47B5-8AE6-305100F3891A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1523DA42-DB7E-47B5-8AE6-305100F3891A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1523DA42-DB7E-47B5-8AE6-305100F3891A}.Debug|ARM.ActiveCfg = Debug|Any CPU
Expand Down Expand Up @@ -463,22 +443,6 @@ Global
{9575AC94-3760-483F-9403-A77E7CFE8F47}.Release|x64.Build.0 = Release|Any CPU
{9575AC94-3760-483F-9403-A77E7CFE8F47}.Release|x86.ActiveCfg = Release|Any CPU
{9575AC94-3760-483F-9403-A77E7CFE8F47}.Release|x86.Build.0 = Release|Any CPU
{2A75C8B3-5122-4E7E-A0CF-A0AD5FFA60B2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2A75C8B3-5122-4E7E-A0CF-A0AD5FFA60B2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2A75C8B3-5122-4E7E-A0CF-A0AD5FFA60B2}.Debug|ARM.ActiveCfg = Debug|Any CPU
{2A75C8B3-5122-4E7E-A0CF-A0AD5FFA60B2}.Debug|ARM.Build.0 = Debug|Any CPU
{2A75C8B3-5122-4E7E-A0CF-A0AD5FFA60B2}.Debug|x64.ActiveCfg = Debug|Any CPU
{2A75C8B3-5122-4E7E-A0CF-A0AD5FFA60B2}.Debug|x64.Build.0 = Debug|Any CPU
{2A75C8B3-5122-4E7E-A0CF-A0AD5FFA60B2}.Debug|x86.ActiveCfg = Debug|Any CPU
{2A75C8B3-5122-4E7E-A0CF-A0AD5FFA60B2}.Debug|x86.Build.0 = Debug|Any CPU
{2A75C8B3-5122-4E7E-A0CF-A0AD5FFA60B2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2A75C8B3-5122-4E7E-A0CF-A0AD5FFA60B2}.Release|Any CPU.Build.0 = Release|Any CPU
{2A75C8B3-5122-4E7E-A0CF-A0AD5FFA60B2}.Release|ARM.ActiveCfg = Release|Any CPU
{2A75C8B3-5122-4E7E-A0CF-A0AD5FFA60B2}.Release|ARM.Build.0 = Release|Any CPU
{2A75C8B3-5122-4E7E-A0CF-A0AD5FFA60B2}.Release|x64.ActiveCfg = Release|Any CPU
{2A75C8B3-5122-4E7E-A0CF-A0AD5FFA60B2}.Release|x64.Build.0 = Release|Any CPU
{2A75C8B3-5122-4E7E-A0CF-A0AD5FFA60B2}.Release|x86.ActiveCfg = Release|Any CPU
{2A75C8B3-5122-4E7E-A0CF-A0AD5FFA60B2}.Release|x86.Build.0 = Release|Any CPU
{C6EFE2AC-63BD-4574-B4A1-9AC80CA5AD2E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C6EFE2AC-63BD-4574-B4A1-9AC80CA5AD2E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C6EFE2AC-63BD-4574-B4A1-9AC80CA5AD2E}.Debug|ARM.ActiveCfg = Debug|Any CPU
Expand Down Expand Up @@ -1142,14 +1106,12 @@ Global
{7945CA45-B9C6-4EDF-9794-6B3B9DD9EE5E} = {19C83FDC-2BC9-42D6-9F51-3A0B822FABAD}
{B16B534A-75FA-4299-9EF9-F4DF801266A0} = {19C83FDC-2BC9-42D6-9F51-3A0B822FABAD}
{6E027771-5500-4555-822C-C7FE6AC8709D} = {19C83FDC-2BC9-42D6-9F51-3A0B822FABAD}
{D3BFF103-53CB-46DC-A0E8-05A01E11099B} = {A9E3AD0D-91F4-48B4-9509-5C06B54C7374}
{4082257D-FC8E-4D37-8489-89AAFC9D4A38} = {19C83FDC-2BC9-42D6-9F51-3A0B822FABAD}
{1523DA42-DB7E-47B5-8AE6-305100F3891A} = {4082257D-FC8E-4D37-8489-89AAFC9D4A38}
{5452AAEA-A679-4056-A2F7-8B6F8137CCAC} = {19C83FDC-2BC9-42D6-9F51-3A0B822FABAD}
{9575AC94-3760-483F-9403-A77E7CFE8F46} = {5452AAEA-A679-4056-A2F7-8B6F8137CCAC}
{1523DA42-DB7E-47B5-8AE6-305100F3891B} = {4082257D-FC8E-4D37-8489-89AAFC9D4A38}
{9575AC94-3760-483F-9403-A77E7CFE8F47} = {5452AAEA-A679-4056-A2F7-8B6F8137CCAC}
{2A75C8B3-5122-4E7E-A0CF-A0AD5FFA60B2} = {44730D39-C672-4CC0-B983-26CC9D7E59C1}
{C6EFE2AC-63BD-4574-B4A1-9AC80CA5AD2E} = {19C83FDC-2BC9-42D6-9F51-3A0B822FABAD}
{A6302463-CC32-4060-B8DF-466479046038} = {19C83FDC-2BC9-42D6-9F51-3A0B822FABAD}
{4DF84F72-0995-44ED-AC0A-A07327F078A2} = {19C83FDC-2BC9-42D6-9F51-3A0B822FABAD}
Expand Down
Loading

0 comments on commit 8c1cbab

Please sign in to comment.