-
Notifications
You must be signed in to change notification settings - Fork 303
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
For NPU Sample, add flexibility in device creation options and fix Ge…
…neric ML Device logic (#624) * For NPU Sample, add flexibility in device creation options and fix Generic ML Device logic Expand NPU sample's capabilities for creating devices based on attributes. More specifically, allow options to filter based on allowed, unallowed, and required attributes. Then add some flags for the most commonly needed options for this sample. The logic for how each interacts with CreateAdapterList is a bit unconventional since CreateAdapterList ANDs the passed in attributes. Tested locally on Intel NPU. * Fix comment typo in NPU Sample * Set D3D Feature Level Requirement to Generic, Optimize Adapter Selection * Add flags to filter for GENERIC_ML only without COMPUTE * Improve labelling of flags & lists for developer friendliness * Minor smaller PR feedback in comments & loop optimization * address initial PR feedback * Simplify adapter discovery logic * Update Package Versions, Simplify Device-Querying Logic * Address PR feedback * Additional PR feedback * Improve documentation to add context for NPU creation * minor fix to sample output * Address Initial PR feedback * Create adapter under COMPUTE feature level if CORE adapters are not availible * Add comments noting that HMODULEs should be freed after usage --------- Co-authored-by: Zu Shi <[email protected]>
- Loading branch information
Showing
4 changed files
with
86 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<packages> | ||
<package id="Microsoft.AI.DirectML" version="1.15.2" targetFramework="native" /> | ||
<package id="Microsoft.AI.MachineLearning" version="1.17.0" targetFramework="native" /> | ||
<package id="Microsoft.AI.MachineLearning" version="1.19.2" targetFramework="native" /> | ||
<package id="Microsoft.Windows.ImplementationLibrary" version="1.0.220914.1" targetFramework="native" /> | ||
</packages> |