Skip to content

Commit 9de4fb5

Browse files
adrastogiAditya Rastogi
andauthored
Windows ML: Consolidate ResNet projections into main solution and fix warnings (#534)
* Remove Resnet C# solution and move those projects to main WinML solution * Fix warnings --------- Co-authored-by: Aditya Rastogi <[email protected]>
1 parent 4f01fbe commit 9de4fb5

File tree

4 files changed

+28
-33
lines changed

4 files changed

+28
-33
lines changed

Samples/WindowsML/Shared/cs/ArgumentParser.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,10 @@ public static void PrintHelp()
187187
Console.WriteLine("Exactly one of --ep_policy or --ep_name must be specified.");
188188
Console.WriteLine();
189189
Console.WriteLine("Available execution providers (name, vendor, device type):");
190-
ExecutionProviderManager.PrintExecutionProviderHelpTable();
190+
ExecutionProviderManager
191+
.PrintExecutionProviderHelpTable()
192+
.GetAwaiter()
193+
.GetResult();
191194
}
192195
}
193196
}

Samples/WindowsML/WindowsML-Samples.sln

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HelloPhi", "cs\HelloPhi\Hel
3636
EndProject
3737
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CppConsoleDesktop.GenAI", "cpp\CppConsoleDesktop.GenAI\CppConsoleDesktop.GenAI.vcxproj", "{7394B294-DE36-4E7B-B737-D3607D36E662}"
3838
EndProject
39+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ResnetBuildDemoCS", "cs\ResnetBuildDemoCS\ResnetBuildDemoCS\ResnetBuildDemoCS.csproj", "{AA9B249B-216B-94F8-D026-6D6F5B62A818}"
40+
EndProject
41+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CppResnetBuildDemo", "cpp\CppResnetBuildDemo\CppResnetBuildDemo\CppResnetBuildDemo.vcxproj", "{70987125-E3F7-43C0-8385-4A090EF9EF54}"
42+
EndProject
3943
Global
4044
GlobalSection(SolutionConfigurationPlatforms) = preSolution
4145
Debug|ARM64 = Debug|ARM64
@@ -136,6 +140,22 @@ Global
136140
{7394B294-DE36-4E7B-B737-D3607D36E662}.Release|ARM64.Build.0 = Release|ARM64
137141
{7394B294-DE36-4E7B-B737-D3607D36E662}.Release|x64.ActiveCfg = Release|x64
138142
{7394B294-DE36-4E7B-B737-D3607D36E662}.Release|x64.Build.0 = Release|x64
143+
{AA9B249B-216B-94F8-D026-6D6F5B62A818}.Debug|ARM64.ActiveCfg = Debug|ARM64
144+
{AA9B249B-216B-94F8-D026-6D6F5B62A818}.Debug|ARM64.Build.0 = Debug|ARM64
145+
{AA9B249B-216B-94F8-D026-6D6F5B62A818}.Debug|x64.ActiveCfg = Debug|x64
146+
{AA9B249B-216B-94F8-D026-6D6F5B62A818}.Debug|x64.Build.0 = Debug|x64
147+
{AA9B249B-216B-94F8-D026-6D6F5B62A818}.Release|ARM64.ActiveCfg = Release|ARM64
148+
{AA9B249B-216B-94F8-D026-6D6F5B62A818}.Release|ARM64.Build.0 = Release|ARM64
149+
{AA9B249B-216B-94F8-D026-6D6F5B62A818}.Release|x64.ActiveCfg = Release|x64
150+
{AA9B249B-216B-94F8-D026-6D6F5B62A818}.Release|x64.Build.0 = Release|x64
151+
{70987125-E3F7-43C0-8385-4A090EF9EF54}.Debug|ARM64.ActiveCfg = Debug|ARM64
152+
{70987125-E3F7-43C0-8385-4A090EF9EF54}.Debug|ARM64.Build.0 = Debug|ARM64
153+
{70987125-E3F7-43C0-8385-4A090EF9EF54}.Debug|x64.ActiveCfg = Debug|x64
154+
{70987125-E3F7-43C0-8385-4A090EF9EF54}.Debug|x64.Build.0 = Debug|x64
155+
{70987125-E3F7-43C0-8385-4A090EF9EF54}.Release|ARM64.ActiveCfg = Release|ARM64
156+
{70987125-E3F7-43C0-8385-4A090EF9EF54}.Release|ARM64.Build.0 = Release|ARM64
157+
{70987125-E3F7-43C0-8385-4A090EF9EF54}.Release|x64.ActiveCfg = Release|x64
158+
{70987125-E3F7-43C0-8385-4A090EF9EF54}.Release|x64.Build.0 = Release|x64
139159
EndGlobalSection
140160
GlobalSection(SolutionProperties) = preSolution
141161
HideSolutionNode = FALSE
@@ -153,6 +173,8 @@ Global
153173
{E6A9B3F5-C8D1-4E7F-9A2E-5C8F1B4D7A9E} = {D8F3A6C1-7E2B-4A9F-8C5D-2E6A9B3F5C8A}
154174
{C4495933-0EFE-D24C-64FB-E581EA4E9909} = {E8F2C4D6-9A7B-4E5C-8D3A-1F6B9E2A7C5D}
155175
{7394B294-DE36-4E7B-B737-D3607D36E662} = {A3B7D9E1-5C2F-4A8B-9E6D-3F7A1B8C5E9F}
176+
{AA9B249B-216B-94F8-D026-6D6F5B62A818} = {E8F2C4D6-9A7B-4E5C-8D3A-1F6B9E2A7C5D}
177+
{70987125-E3F7-43C0-8385-4A090EF9EF54} = {A3B7D9E1-5C2F-4A8B-9E6D-3F7A1B8C5E9F}
156178
EndGlobalSection
157179
GlobalSection(ExtensibilityGlobals) = postSolution
158180
SolutionGuid = {12345678-1234-5678-9ABC-123456789012}

Samples/WindowsML/cs-winui/MainWindow.xaml.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,8 @@ private async Task LoadModelAsync()
135135
private async Task LoadAndRunDemoAsync()
136136
{
137137
// Get application directory
138-
var appDirectory = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
138+
var appDirectory = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)
139+
?? throw new InvalidOperationException("Could not determine application directory");
139140
var imagePath = Path.Combine(appDirectory, "image.png");
140141

141142
if (!File.Exists(imagePath))

Samples/WindowsML/cs/ResnetBuildDemoCS/ResnetBuildDemoCS.sln

Lines changed: 0 additions & 31 deletions
This file was deleted.

0 commit comments

Comments
 (0)