* 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 <zuomingshi@microsoft.com>
* WIP: DML Flatbuffer dispatchable
* WIP: everything is buildable at this point
* Update DML to 1.14.2
* Update DML to 1.14.2
* Add DirectML helper files
* WIP: inluded dml_grap_elper.
* Add flatbuffer library
* core_common_fb_errpr
* Include Serialization and related DML Helper files. It is in Buildable state
* matching gemm models for fb and onnx during deserializing step
* HRESULT error
* compiling_done_move_to_initialize
* implemented_not_validated_dispatch_table
* changes
* Re-design buildable
* Fix parsing
* end to end working with wrong result
* validated gemm on fb
* formatting
* json fix
* refactor to avoid explicit json reference
* 4/4 models
* refactor before clean up
* final refactoring
* left with removing data types as class variable
* m_resources still not local
* formatting
* sizeinbytes calculation
* sizeinbytes calculation formatting
* PR ready
* latest changes
* safemultiply
* nit
* Addressed PR feedback
* Remove extra line
* first pass guide
* Removed large real-world models and add a dummy model for sample
* Removing byte macro
* Fix linux build
* Move the definition into separate file
* include child directmlhelpers directory
* use forward slash
* asdf
* asdf
---------
Co-authored-by: Bereket Nigussie <t-bnigussie@microsoft.com>
Co-authored-by: Sumit Agarwal <sumitagarwal@microsoft.com>
* Update Microsoft.ML.OnnxRuntime.DirectML version to 1.15.0->1.17.1
* Change hash case a-f to A-F
---------
Co-authored-by: Christian Larson <28911437+chrilaMSFT@users.noreply.github.com>
* Add DirectMLNpuInference sample
* enable npu by default
* Add wait after run
* move timing end to correct place
* snake_case to camelCase
* misc fixes
* Run warm up first
* CR feedback
* Move comments around
* should be true by default
* CR feedback
---------
Co-authored-by: Sheil Kumar <sheilk@microsoft.com>
* Update compile and link commands to address binskim
* Revert version to DML_FEATURE_LEVEL_5_0 and update spacing
* update feature level and error handling
* update parsing logic
* Revert default dml feature level to DML_FEATURE_LEVEL_5_0
---------
Co-authored-by: Christian Larson (from Dev Box) <28911437+chrilaMSFT@users.noreply.github.com>
Update code for binskim by changing MSVC compile and linker options. Needed to update FMT dependency as well to to fix build error with new flags.
---------
Co-authored-by: Christian Larson (from Dev Box) <28911437+chrilaMSFT@users.noreply.github.com>
* Update Code to work with agility SDK, added Dred, update agilitySdk
* Update error handling and code comments
---------
Co-authored-by: Christian Larson <28911437+chrilaMSFT@users.noreply.github.com>