Skip to content

Commit

Permalink
build: fix LTC code after upstream PyTorch change (llvm#1727)
Browse files Browse the repository at this point in the history
pytorch/pytorch@140a3139 reverted a change from yesterday, causing the
RollPyTorch action to break.  This patch reverts the corresponding
change in the torch-mlir LTC code.

This patch also re-enables tests that were previously marked as XFAIL.
  • Loading branch information
ashay authored Dec 16, 2022
1 parent 17ee643 commit dd1cf57
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 26 deletions.
22 changes: 0 additions & 22 deletions e2e_testing/xfail_sets.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,28 +17,6 @@
TORCHDYNAMO_XFAIL_SET = {
#### General TorchDynamo/PyTorch errors

# https://github.com/pytorch/torchdynamo/issues/1891
# AssertionError: torch.* op returned non-Tensor bool call_function aten.Bool
"AllBoolFalseModule_basic",
"AllBoolTrueModule_basic",
"AnyBoolFalseModule_basic",
"AnyBoolTrueModule_basic",
"BoolFloatFalseModule_basic",
"BoolFloatTrueModule_basic",
"BoolFloatConstantModule_basic",
"BoolIntFalseModule_basic",
"BoolIntTrueModule_basic",
"BoolIntConstantModule_basic",
"CeilFloatModule_basic",
"ContainsIntList_False",
"ContainsIntList_True",
"GeIntModule_basic",
"LenStrModule_basic",
"SqrtIntConstantModule_basic",
"SqrtIntModule_basic",
"NumelModule_basic",
"NumelZeroRankModule_basic",

# RecursionError: maximum recursion depth exceeded
# RuntimeError: Failed running call_function aten.lift_fresh_copy(...
# https://github.com/pytorch/pytorch/issues/89627
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ at::Tensor LazyNativeFunctions::empty_symint(
c10::optional<bool> pin_memory,
c10::optional<at::MemoryFormat> memory_format) {
// TODO: support this directly
auto size = C10_AS_INTARRAYREF_SLOW(sym_size);
auto size = c10::asIntArrayRefSlow(sym_size);
const auto device_type = torch::lazy::getBackend()->EagerFallbackDeviceType();
at::TensorOptions options = at::TensorOptions()
.device(c10::Device(device_type))
Expand Down
2 changes: 1 addition & 1 deletion pytorch-hash.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1902ca9d533da6d24b1fb9d0c345349d51ae26ad
2bd3fbe2e6b42f3c8f7eea443c89b515cb1981f1
4 changes: 2 additions & 2 deletions pytorch-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html
--pre
torch==2.0.0.dev20221215
torchvision==0.15.0.dev20221215
torch==2.0.0.dev20221216
torchvision==0.15.0.dev20221216

0 comments on commit dd1cf57

Please sign in to comment.