Skip to content

Build MicrosoftMLRunner for using WinML nuget and make WinMLRunner only load from System32#348

Merged
ryanlai2 merged 17 commits intomasterfrom
user/rylai/nuget_changes
Sep 9, 2020
Merged

Build MicrosoftMLRunner for using WinML nuget and make WinMLRunner only load from System32#348
ryanlai2 merged 17 commits intomasterfrom
user/rylai/nuget_changes

Conversation

@ryanlai2
Copy link
Contributor

@ryanlai2 ryanlai2 commented Sep 4, 2020

There are a few changes here:

  • Add ifdef USE_WINML_NUGET to switch between using Windows.AI.Machinelearning and Microsoft.AI.MachineLearning
    • Separate out the build configurations to be able to build debug and release versions of inbox and nuget. For example : Release_Inbox and Release_Nuget.
    • For nuget builds, build MicrosoftMLRunner.exe instead of WinMLRunner.exe
  • Update WinMLRunner README.md documentation to explain usage of nuget in MicrosoftMLRunner.
  • Remove dllload.cpp to remove WinRT_RoGetActivationFactory hook. Don't want to advocate this type of DLL hooking.
  • Refactor OutputHelper.h and BindingUtilities.h by moving all of the implementation into respective .cpp files and only exposing functions
  • Add WinML nuget 1.4.0 and Winrt nuget
  • Fix WinMLRunner tests to use const cast

@ryanlai2 ryanlai2 requested a review from a team as a code owner September 4, 2020 01:44
Ryan Lai added 2 commits September 4, 2020 10:38
remove pragma in outputhelper.cpp
@@ -0,0 +1,1004 @@
#include "d3dx12.h"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implementation was moved from BindingUtilties.h into BindingUtilities.cpp

@@ -0,0 +1,1197 @@
#include "Common.h"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implementation was moved from OutputHelper.h into OutputHelper.cpp

}

const std::string& status) const;
void PrintModelInfo(std::wstring modelPath, LearningModel model) const;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should take const references

static void PrintLearningModelDevice(const LearningModelDeviceWithMetadata& device);
static std::wstring FeatureDescriptorToString(const ILearningModelFeatureDescriptor& descriptor);
static bool doesDescriptorContainFP16(const ILearningModelFeatureDescriptor& descriptor);
static bool doesModelContainFP16(const LearningModel model);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should take const reference

Copy link
Contributor

@tiagoshibata tiagoshibata left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, left a couple of comments on the refactored code

@ryanlai2 ryanlai2 merged commit 7f9e191 into master Sep 9, 2020
@martinb35 martinb35 deleted the user/rylai/nuget_changes branch June 21, 2021 19:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants