Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DirectML.dll load fails when executable path contains Non-English characters #9229

Merged
merged 3 commits into from
Sep 30, 2021

Conversation

smk2007
Copy link
Member

@smk2007 smk2007 commented Sep 30, 2021

DirectML.dll load fails when executable path contains Non-English characters

Issue: DirectML.dll is loaded with LoadLibraryExA when it should be using LoadLibraryExW

Test: Windows AI builds correctly and loads correctly when built exes are run from paths containing unicode:
https://aiinfra.visualstudio.com/Lotus/_build/results?buildId=176800&view=results

fdwr
fdwr previously approved these changes Sep 30, 2021
Copy link
Contributor

@fdwr fdwr left a comment

Choose a reason for hiding this comment

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

Unicode 👍.

auto out_path = std::string(absolute_path);
out_path.resize(idx);
auto idx = std::distance(absolute_path, name);
auto out_path = std::wstring(absolute_path);
Copy link
Contributor

Choose a reason for hiding this comment

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

I think auto out_path = std::wstring(absolute_path, idx); does one copy with the right size

@smk2007 smk2007 merged commit c6cb49c into master Sep 30, 2021
@smk2007 smk2007 deleted the user/sheilk/directml-load-unicode branch September 30, 2021 22:16
smk2007 added a commit that referenced this pull request Sep 30, 2021
…racters (#9229)

* enable unicode dml

* add wide string L prefix

* Add Fail Fast back

Co-authored-by: Sheil Kumar <sheilk@microsoft.com>
smk2007 added a commit that referenced this pull request Oct 1, 2021
* Add full iOS job in package pipeline (#9036)

* Add full ios xcframework job

* create zip file of the xcframework

* Bump up TVM version to avoid conflict with existing one (#9159)

* Bump up tvm version

* Bump up onnxruntime-tvm version

There are some c++17 related fixes in TVM

Co-authored-by: KeDengMS <kedeng@microsoft.com>

* fix bug introduced by PR9130 (#9166)

* make uwp store apps link to statically-linked crt desktop builds (#9182)

Co-authored-by: Sheil Kumar <sheilk@microsoft.com>

* #9182 removed the `--is_store_build` option but one place where that was used was missed. (#9219)

This should fix the relevant packaging pipelines.

* DirectML.dll load fails when executable path contains Non-English characters (#9229)

* enable unicode dml

* add wide string L prefix

* Add Fail Fast back

Co-authored-by: Sheil Kumar <sheilk@microsoft.com>

* Fix Android build break after Virtual Environment update to 20210919  (#9163)

Co-authored-by: Guoyu Wang <62914304+gwang-msft@users.noreply.github.com>
Co-authored-by: ke1337 <22626095+ke1337@users.noreply.github.com>
Co-authored-by: KeDengMS <kedeng@microsoft.com>
Co-authored-by: George Wu <jywu@microsoft.com>
Co-authored-by: Sheil Kumar <sheilk@microsoft.com>
Co-authored-by: Scott McKay <skottmckay@gmail.com>
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.

4 participants