diff --git a/TensorFlow.NET.sln b/TensorFlow.NET.sln index 8d230d26..3915a4cd 100644 --- a/TensorFlow.NET.sln +++ b/TensorFlow.NET.sln @@ -22,6 +22,12 @@ EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TensorFlowDatasets", "src\TensorFlowDatasets\TensorFlowDatasets.csproj", "{DF151A51-E9FD-41BD-B0F4-08A743755D44}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TensorFlowNET.Examples.GPU", "test\TensorFlowNET.Examples\TensorFlowNET.Examples.GPU.csproj", "{6F6B3382-8F87-4CD9-BF87-C81D5405685A}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "scripts", "scripts", "{EA9A238E-B93F-4809-AB3D-339B2990FBFF}" + ProjectSection(SolutionItems) = preProject + scripts\Copy-NativeTensorFlowLibs.ps1 = scripts\Copy-NativeTensorFlowLibs.ps1 + EndProjectSection +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "runtime.win-x64.SciSharp.TensorFlow-Gpu.Redist", "src\runtime.win-x64.SciSharp.TensorFlow-Gpu.Redist\runtime.win-x64.SciSharp.TensorFlow-Gpu.Redist.csproj", "{BEC7FC31-58BD-48C1-96CE-6B68570A5431}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -61,6 +67,7 @@ Global {B598E5D5-BD2D-4191-8532-F2FBAC31AB81}.Debug|Any CPU.Build.0 = Debug|Any CPU {B598E5D5-BD2D-4191-8532-F2FBAC31AB81}.Release|Any CPU.ActiveCfg = Release|Any CPU {B598E5D5-BD2D-4191-8532-F2FBAC31AB81}.Release|Any CPU.Build.0 = Release|Any CPU +<<<<<<< HEAD {DF151A51-E9FD-41BD-B0F4-08A743755D44}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DF151A51-E9FD-41BD-B0F4-08A743755D44}.Debug|Any CPU.Build.0 = Debug|Any CPU {DF151A51-E9FD-41BD-B0F4-08A743755D44}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -69,6 +76,12 @@ Global {6F6B3382-8F87-4CD9-BF87-C81D5405685A}.Debug|Any CPU.Build.0 = Debug|Any CPU {6F6B3382-8F87-4CD9-BF87-C81D5405685A}.Release|Any CPU.ActiveCfg = Release|Any CPU {6F6B3382-8F87-4CD9-BF87-C81D5405685A}.Release|Any CPU.Build.0 = Release|Any CPU +======= + {BEC7FC31-58BD-48C1-96CE-6B68570A5431}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BEC7FC31-58BD-48C1-96CE-6B68570A5431}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BEC7FC31-58BD-48C1-96CE-6B68570A5431}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BEC7FC31-58BD-48C1-96CE-6B68570A5431}.Release|Any CPU.Build.0 = Release|Any CPU +>>>>>>> Provide the win-x64 runtime nuget for TensorFlow Gpu EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/scripts/Copy-NativeTensorFlowLibs.ps1 b/scripts/Copy-NativeTensorFlowLibs.ps1 new file mode 100644 index 00000000..b4dcf493 --- /dev/null +++ b/scripts/Copy-NativeTensorFlowLibs.ps1 @@ -0,0 +1,21 @@ +$targetDirectory = [IO.Path]::Combine($PSScriptRoot, "..", "src", "runtime.win-x64.SciSharp.TensorFlow-Gpu.Redist") + +$fileName = "libtensorflow-gpu-windows-x86_64-1.14.0.zip" +$zipfile = [IO.Path]::Combine($PSScriptRoot, "..", "packages", $fileName) +if (-not (Test-Path $zipfile -PathType Leaf)) { + # Create the directory just in case it's actually needed... + $path = [IO.Path]::Combine($PSScriptRoot, "..", "packages") + New-Item -Path $path -Force -ItemType Directory + Write-Host "Downloading libtensorflow gpu for Windows..." + $wc = New-Object System.Net.WebClient + $wc.DownloadFile("https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-gpu-windows-x86_64-1.14.0.zip", $zipfile) +} + +$libraryName = "tensoflow.dll" +$libraryLocation = "lib\tensorflow.dll" +$windowsTensorFlow = Join-Path $targetDirectory $libraryName + +if (-not (Test-Path $windowsTensorFlow)) +{ + & 7z e $zipfile $libraryLocation -o"$targetDirectory" +} \ No newline at end of file diff --git a/src/runtime.win-x64.SciSharp.TensorFlow-Gpu.Redist/.gitignore b/src/runtime.win-x64.SciSharp.TensorFlow-Gpu.Redist/.gitignore new file mode 100644 index 00000000..fca132d9 --- /dev/null +++ b/src/runtime.win-x64.SciSharp.TensorFlow-Gpu.Redist/.gitignore @@ -0,0 +1 @@ +tensorflow.dll diff --git a/src/runtime.win-x64.SciSharp.TensorFlow-Gpu.Redist/runtime.win-x64.SciSharp.TensorFlow-Gpu.Redist.csproj b/src/runtime.win-x64.SciSharp.TensorFlow-Gpu.Redist/runtime.win-x64.SciSharp.TensorFlow-Gpu.Redist.csproj new file mode 100644 index 00000000..915e0e2a --- /dev/null +++ b/src/runtime.win-x64.SciSharp.TensorFlow-Gpu.Redist/runtime.win-x64.SciSharp.TensorFlow-Gpu.Redist.csproj @@ -0,0 +1,40 @@ + + + + Library + netstandard2.0 + win-x64 + SciSharp.Tensorflow-Gpu.Redist + + runtime.win-x64.SciSharp.Tensorflow-Gpu.Redist + 1.0.0 + SciSharp team + SciSharp STACK + https://github.com/SciSharp/TensorFlow.NET + git + + Distribution of the windows GPU Tensoflow library. + Dll can be directly downloaded from https://storage.googleapis.com/tensorflow/libtensorflow/ + + Apache-2.0 + + https://github.com/SciSharp/TensorFlow.NET + native;tensorflow;machine-learning;ML + ../../packages + false + + false + false + false + + + + + + runtimes/$(RuntimeIdentifier)/native/%(Filename)%(Extension) + true + PreserveNewest + + + + \ No newline at end of file