Skip to content

Commit ef08825

Browse files
committed
Fix torch patch
1 parent 95de67f commit ef08825

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

graalpython/lib-graalpython/patches/torch/torch-1.13.1.patch

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -527,14 +527,13 @@ index a1d6de21..4a8e6487 100644
527527
py::class_<torch::autograd::SavedVariable>(m, "SavedTensor")
528528
.def(py::init([]() -> torch::autograd::SavedVariable {
529529
diff --git a/torch/csrc/autograd/python_variable_indexing.cpp b/torch/csrc/autograd/python_variable_indexing.cpp
530-
index 8c9ed1d7..5183a325 100644
530+
index 8c9ed1d7..69ecb4ca 100644
531531
--- a/torch/csrc/autograd/python_variable_indexing.cpp
532532
+++ b/torch/csrc/autograd/python_variable_indexing.cpp
533-
@@ -141,26 +141,28 @@ static inline void checkUnpackSlice(
534-
}
533+
@@ -142,25 +142,28 @@ static inline void checkUnpackSlice(
535534

536535
static inline void recordSliceTrace(PyObject* obj) {
537-
- PySliceObject* sliceobj = (PySliceObject*)obj;
536+
PySliceObject* sliceobj = (PySliceObject*)obj;
538537
- if (THPVariable_Check(sliceobj->start)) {
539538
+ PyObject* slicestart = PySlice_Start(sliceobj);
540539
+ if (THPVariable_Check(slicestart)) {

0 commit comments

Comments
 (0)