-
Notifications
You must be signed in to change notification settings - Fork 20
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
[PT2.6][Windows] Fix Windows Codegen #1057
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pls. check the build failures.
execute_process(COMMAND cmd /c mklink /D ${LinkPATH} ${TargetPATH}) | ||
string(REPLACE "/" "\\" DestPATH "${CODEGEN_TEMPLATE}templates") | ||
string(REPLACE "/" "\\" SrcPATH "${CMAKE_SOURCE_DIR}/aten/src/ATen/templates") | ||
execute_process(COMMAND cmd /c xcopy ${SrcPATH} ${DestPATH} /E /H /C /I /Y > nul) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ratnampa , do you know why mklink
did not impact the Windows build in the past?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@EikanWang I am not sure why this wasn't an issue before, but seems that the admin privileges is the only issue. I have updated the code, it should pass CI, and copy should work.
Running codegen on windows is running into below error recently,
FileNotFoundError: [Errno 2] No such file or directory: 'C:/Users/sdp/ratnam-work/pytorch/third_party/torch-xpu-ops/yaml/templates\\RegisterDispatchDefinitions.ini'
This is caused due to this symlink command in windows not running a shell or cmd as an administrator
torch-xpu-ops/cmake/Codegen.cmake
Line 61 in b1582e1
Also, when symlink is not performed due to access issues, cmake throws such error:
You do not have sufficient privilege to perform this operation.
Resolution
Change symlink to copy templates folder and delete it once codegen is complete.