CPU/XPU: disable torch.compile if g++ is not available#1251
Conversation
|
Hi @Titus-von-Koeller Could you please review? Thanks. Looks like the CI failure is about ROCM. I am not sure if the failure is caused by this PR. |
|
Related: pytorch/pytorch#124245 I'm not sure what PyTorch release that's going to land in, but good news is that it looks like it'll eventually support MSVC on Windows and we can update this as appropriate. Until then, I think this will be OK. |
|
Hi @matthewdouglas Yes, it will still take some time to enable |
Windows default compiler is msvc(cl.exe), please correct it. :) |
Thanks for the correction. |
@Xia-Weiwen does this still need correction or is this ready to merge? In the diff it still shows gcc for the compiler... |
|
@Titus-von-Koeller That's just a correction on comment about the compiler requirement for Windows (when we get there). It will use MSVC by default and not clang. I think it's OK to merge now as it is and my commentary here is just a note for future refinement. |
|
Hi @Titus-von-Koeller . This PR does not need correction. |
|
Hi @Titus-von-Koeller Do you have more comments? Thanks |
|
Hallo @Titus-von-Koeller It's been a while since last update. Do you think there are any blocking issues preventing this PR merging? Thanks. |
1bfecc8
into
bitsandbytes-foundation:multi-backend-refactor
|
@Xia-Weiwen Yes, everything is right the way it is then, thanks for the clarification! |
Thanks! |
torch.compilerequiresg++. On platforms like Windows,g++is not available. In that case,torch.compileis disabled to avoid runtime errors. With this patch, the CPU/XPU backend works on Windows.I have validated CPU backend with the patch by running UTs for CPU backend in
test_functional.pyand a real model (OPT-1.3B) on my local machine (Windows 11 Enterprise, 12th Gen Intel(R) Core(TM) i7-1270P 2.20 GHz, 16.0 GB RAM).