Repository navigation
Fix cl.exe detection in cpu/fused_kernel.cpp - #50085
skyline75489 wants to merge 1 commit into
Conversation
💊 CI failures summary and remediationsAs of commit e2d3592 (more details on the Dr. CI page): ✅ None of the CI failures appear to be your fault 💚
1 job timed out:
🚧 1 fixed upstream failure:These were probably caused by upstream breakages that were already fixed.
Please rebase on the
|
|
Any way to get test coverage for this? |
facebook-github-bot
left a comment
There was a problem hiding this comment.
@ezyang has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
I dunno. There’s similar code below for “runCompiler”. I assume on Windows the CI is under the correct VS env, since no one found this before. It’d be hard for me mock a non-VS env. |
|
@skyline75489 Could you please tell me the reason? It runs okay locally at my side. |
|
So basically i am using a env without cl.exe available. I found the activate() code which delibrately activate the VS env for compiling. But the programExists() isn't using the env_list. I cannot succesfully run the test cases cuz of this. Note that in the original logic, if programExists() returns false, With this fix, i can finally run the test cases. |
|
The runCompiler is also using run() on Windows instead of system(). So i think someone just forgot to copy the logic into programExists. |
Summary: The command used here is essentially `where cl.exe`. By using `system()` we will not be able to find cl.exe unless we are using VS Developer Prompt, which makes `activate()` meaningless. Change `system()` to `run()` fixes this. Found during pytorch#49781. Pull Request resolved: pytorch#50085 Reviewed By: smessmer Differential Revision: D25782054 Pulled By: ezyang fbshipit-source-id: e8e3cac903a73f3bd78def667ebe0e93201814c8
The command used here is essentially
where cl.exe. By usingsystem()we will not be able to find cl.exe unless we are using VS Developer Prompt, which makesactivate()meaningless. Changesystem()torun()fixes this.Found during #49781.