Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions torch/csrc/dynamo/compiled_autograd.h
Original file line number Diff line number Diff line change
Expand Up @@ -1057,6 +1057,13 @@ struct IValuePacker {
// That's what the TypePtr is for: it contains the information to do the
// parsing. See torch::jit::toIValue for more information.
static at::TypePtr packed_type() {
#ifdef _WIN32
// NB: the if-constexpr usage triggers compilation errors on Windows
// with certain compiler settings
// (see https://github.com/pytorch/pytorch/pull/144707 for examples).
// It's not clear what the problem is, so we're going to ignore it for now.
TORCH_INTERNAL_ASSERT(false, "torch.compile not supported on Windows");
Copy link
Contributor

Choose a reason for hiding this comment

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

I though torch.compile was supported on Windows, and somehow this only affects Windows builds, so may be a more selective ifdef would be good there

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think torch.compile works on windows: #122094, but I've never tried it out. The main problem we had was that triton doesn't work on windows

#else
if constexpr (::std::is_same_v<T, at::Tensor>) {
return at::TensorType::get();
} else if constexpr (::std::is_same_v<T, int64_t>) {
Expand Down Expand Up @@ -1095,6 +1102,7 @@ struct IValuePacker {
TORCH_INTERNAL_ASSERT(false, "IValuePacker not implemented for type");
return at::NoneType::get();
}
#endif
}
};

Expand Down
Loading