Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/163188
Note: Links to docs will display an error until the docs builds have been completed. ❌ 1 Cancelled JobAs of commit c9d7065 with merge base 232dd65 ( CANCELLED JOB - The following job was cancelled. Please retry:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
a5417a9 to
b463579
Compare
| self.prefix.splice( | ||
| f""" | ||
| if ((long({input_name}.data_ptr()) & ({GPU_ALIGN_BYTES} -1)) != 0) {{ | ||
| if ((reinterpret_cast<std::uintptr_t>({input_name}.data_ptr()) & ({GPU_ALIGN_BYTES} -1)) != 0) {{ |
There was a problem hiding this comment.
has to change this for windows cross-compilation. This should also work for linux.
8b8abf2 to
0436a69
Compare
| #pragma once | ||
| #ifdef _WIN32 | ||
| #include <Windows.h> | ||
| #include <windows.h> |
There was a problem hiding this comment.
has to use lower case for cross-compilation. windows is not case-sensitive, but linux is
0436a69 to
e5ed60a
Compare
|
Neat! Who is using AOTI on Windows? Can you show evidence that this is running on our Windows CI? Thanks! (Not a full review, deferring to AOTI peeps) |
@ezyang This is for Executorch (aka limited unified runtime) to use AOTI as a backend for windows. I haven't added this to windows CI yet, but that's next step! |
| return x | ||
|
|
||
|
|
||
| class TestAOTInductorWindowsCrossCompilation(TestCase): |
There was a problem hiding this comment.
I am really not sure how to test this cross compilation workflow in CI.
@seemethere for context: we build a binary on linux with mingw and then run it on windows.
any recommendation on how to test that?
The only thing I can think of would be to have a two workflows one after the other, but that might be a lot of setup work?
There was a problem hiding this comment.
If we have WSL on the windows CI, we can build this in WSL, and then run the rest on windows. This is how I'm testing it locally as well.
albanD
left a comment
There was a problem hiding this comment.
Sounds good to me!
We can follow up with Eli on the testing.
I will let Bin approve this one though since I might have missed some things here.
torch/_inductor/cpp_builder.py
Outdated
| _IS_LINUX = sys.platform.startswith("linux") | ||
| _IS_MACOS = sys.platform.startswith("darwin") | ||
| _IS_WINDOWS = sys.platform == "win32" | ||
| AOTI_SHIM_LIB = os.environ.get("AOTI_SHIM_LIB") # used for AOTI cross-compilation |
There was a problem hiding this comment.
I feel this naming does not distinguish from config.aot_inductor.aoti_shim_library.
There was a problem hiding this comment.
Maybe AOTI_SHIM_LIBRARY_PATH?
There was a problem hiding this comment.
Better. Also why don't we have a corresponding config for this one. Ad hoc environment variable makes it hard for users to discover.
There was a problem hiding this comment.
make sense. I updated this to a config now.
3db0fe5 to
33099a6
Compare
|
@pytorchbot merge |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Merge failedReason: 1 mandatory check(s) failed. The first few are: Dig deeper by viewing the failures on hud |
a05f4e4 to
5a49abe
Compare
5a49abe to
c9d7065
Compare
|
@pytorchbot merge |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Merge failedReason: 1 mandatory check(s) failed. The first few are: Dig deeper by viewing the failures on hud |
|
@pytorchbot merge -i |
Merge startedYour change will be merged while ignoring the following 1 checks: Lint / lintrunner-clang / linux-job Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
To run this, you need to install `mingw64-gcc-c++` and download windows cuda library toolkit. See design doc and demo instructions in https://docs.google.com/document/d/1iDaChqA5nNKkBFTzsdkmoomvQlXHbnlb1Z4yEp7xaJA/edit?tab=t.0 If cross_platform_target is windows, we do the following: - do not link to `sleef`. This can be improved in the future if we need it. Currently I avoid it because that requires extra setup on the linux side - Use `mingw64-gcc-c++` to compile - Use `WINDOWS_CUDA_HOME` instead of `CUDA_HOME` when linking to cuda ``` python test/inductor/test_aot_inductor_windows.py -k so ``` Other changes: - de-couples compile_standalone config and dynamic link flag - create a new aot_inductor_mode config module, which is used to control configs in aot_inductor. Pull Request resolved: pytorch#163188 Approved by: https://github.com/desertfire
To run this, you need to install
mingw64-gcc-c++and download windows cuda library toolkit.See design doc and demo instructions in https://docs.google.com/document/d/1iDaChqA5nNKkBFTzsdkmoomvQlXHbnlb1Z4yEp7xaJA/edit?tab=t.0
If cross_platform_target is windows, we do the following:
sleef. This can be improved in the future if we need it. Currently I avoid it because that requires extra setup on the linux sidemingw64-gcc-c++to compileWINDOWS_CUDA_HOMEinstead ofCUDA_HOMEwhen linking to cudaOther changes:
cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @chenyang78 @kadeng @muchulee8 @amjames @chauhang @aakhundov @coconutruben