Skip to content

Commit 5dc3ae1

Browse files
authored
Update remaining torch patches (#2554)
Signed-off-by: Gu, Jinghui <jinghui.gu@intel.com>
1 parent b7105c8 commit 5dc3ae1

16 files changed

+470
-175
lines changed

torch_patches/0002-enable-xpu-group-norm-channels-last-support-87680.patch renamed to torch_patches/0001-enable-xpu-group-norm-channels-last-support-87680.patch

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
From 7ce48fc557c50e64f6adc135cf893623aff03cc5 Mon Sep 17 00:00:00 2001
1+
From bcd8cddd204db21474ce35d2ccce8fb04db6b119 Mon Sep 17 00:00:00 2001
22
From: KevinYuk <kevin.yu@intel.com>
33
Date: Mon, 31 Oct 2022 19:46:01 +0000
4-
Subject: [PATCH 02/11] enable xpu group norm channels last support (#87680)
4+
Subject: [PATCH 01/15] enable xpu group norm channels last support (#87680)
55

66
XPU would support channels last format for group norm operator, however, Pytorch converts all input tensor to contiguous format, which includes channels last tensor. Need Pytorch pass down this memory format hint to us.
77
Pull Request resolved: https://github.com/pytorch/pytorch/pull/87680
@@ -12,7 +12,7 @@ Approved by: https://github.com/albanD
1212
2 files changed, 2 insertions(+), 2 deletions(-)
1313

1414
diff --git a/aten/src/ATen/native/group_norm.cpp b/aten/src/ATen/native/group_norm.cpp
15-
index db1d82f84f..527e04c582 100644
15+
index db1d82f84fe..527e04c5827 100644
1616
--- a/aten/src/ATen/native/group_norm.cpp
1717
+++ b/aten/src/ATen/native/group_norm.cpp
1818
@@ -172,7 +172,7 @@ Tensor group_norm(
@@ -25,7 +25,7 @@ index db1d82f84f..527e04c582 100644
2525
const auto& gamma = weight.defined() ? weight.contiguous() : kEmpty;
2626
const auto& beta = bias.defined() ? bias.contiguous() : kEmpty;
2727
diff --git a/tools/autograd/derivatives.yaml b/tools/autograd/derivatives.yaml
28-
index 3fb18bd206..18236ea244 100644
28+
index 3fb18bd206d..18236ea244e 100644
2929
--- a/tools/autograd/derivatives.yaml
3030
+++ b/tools/autograd/derivatives.yaml
3131
@@ -1164,7 +1164,7 @@

torch_patches/0003-add-support-for-pin-memory-on-xpu-device-86545.patch renamed to torch_patches/0002-add-support-for-pin-memory-on-xpu-device-86545.patch

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
From 763de4eb63f883178735652545786cd0592d1a4a Mon Sep 17 00:00:00 2001
1+
From d3669bb6404ba61707d79d939afe647d08c165bf Mon Sep 17 00:00:00 2001
22
From: leizhenyuan <zhenyuan.lei@intel.com>
33
Date: Wed, 19 Oct 2022 13:24:48 +0000
4-
Subject: [PATCH 03/11] add support for pin memory on xpu device (#86545)
4+
Subject: [PATCH 02/15] add support for pin memory on xpu device (#86545)
55

66
add support for pin memory on xpu device
77

@@ -13,7 +13,7 @@ Approved by: https://github.com/ezyang
1313
2 files changed, 9 insertions(+), 2 deletions(-)
1414

1515
diff --git a/torch/utils/data/_utils/pin_memory.py b/torch/utils/data/_utils/pin_memory.py
16-
index d3aa9118cb..466cf0c70e 100644
16+
index d3aa9118cb6..466cf0c70e2 100644
1717
--- a/torch/utils/data/_utils/pin_memory.py
1818
+++ b/torch/utils/data/_utils/pin_memory.py
1919
@@ -19,7 +19,10 @@ def _pin_memory_loop(in_queue, out_queue, device_id, done_event, device):
@@ -29,7 +29,7 @@ index d3aa9118cb..466cf0c70e 100644
2929
def do_one_step():
3030
try:
3131
diff --git a/torch/utils/data/dataloader.py b/torch/utils/data/dataloader.py
32-
index eac52ba29c..5dc0358ddc 100644
32+
index eac52ba29c8..5dc0358ddc7 100644
3333
--- a/torch/utils/data/dataloader.py
3434
+++ b/torch/utils/data/dataloader.py
3535
@@ -1040,10 +1040,14 @@ class _MultiProcessingDataLoaderIter(_BaseDataLoaderIter):

torch_patches/0007-add-XPU-backend-to-support-torch.save-and-torch.load.patch renamed to torch_patches/0003-add-XPU-backend-to-support-torch.save-and-torch.load.patch

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
From b165c779a466946bc2875953d275662e10b12930 Mon Sep 17 00:00:00 2001
1+
From 7ab45984c9a48f8b16adaa997486111bf689c4e2 Mon Sep 17 00:00:00 2001
22
From: "Yu, Guangye" <guangye.yu@intel.com>
33
Date: Wed, 30 Nov 2022 20:38:02 +0000
4-
Subject: [PATCH 07/11] add XPU backend to support torch.save and torch.load
4+
Subject: [PATCH 03/15] add XPU backend to support torch.save and torch.load
55
(#89679)
66

77
We need to add XPU backend to support torch.save and torch.load when parameter _use_new_zipfile_serialization=False.
@@ -25,7 +25,7 @@ Approved by: https://github.com/ezyang
2525
2 files changed, 25 insertions(+), 16 deletions(-)
2626

2727
diff --git a/test/test_torch.py b/test/test_torch.py
28-
index 8de5b822d0..cadbcf4bcd 100644
28+
index 8de5b822d00..cadbcf4bcdd 100644
2929
--- a/test/test_torch.py
3030
+++ b/test/test_torch.py
3131
@@ -356,7 +356,7 @@ class TestTorchDeviceType(TestCase):
@@ -38,7 +38,7 @@ index 8de5b822d0..cadbcf4bcd 100644
3838

3939
for device in ['cpu', 'cuda'] if torch.cuda.is_available() else ['cpu']:
4040
diff --git a/torch/csrc/serialization.cpp b/torch/csrc/serialization.cpp
41-
index 46f3a04f35..5cc88ad0f1 100644
41+
index 46f3a04f355..5cc88ad0f18 100644
4242
--- a/torch/csrc/serialization.cpp
4343
+++ b/torch/csrc/serialization.cpp
4444
@@ -1,6 +1,7 @@

torch_patches/0001-Add-DLPack-oneAPI-support-for-the-XPU-device-for-exp.patch renamed to torch_patches/0004-Add-DLPack-oneAPI-support-for-the-XPU-device-for-exp.patch

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
From bedd439a1447610754c5bd4089d5498b4b419df7 Mon Sep 17 00:00:00 2001
1+
From d63f3ba1156f5b7a9c040b6721d5874c613f59c1 Mon Sep 17 00:00:00 2001
22
From: johnlu <chengjun.lu@intel.com>
33
Date: Mon, 28 Mar 2022 20:49:03 +0800
4-
Subject: [PATCH 01/11] Add DLPack oneAPI support for the XPU device for
4+
Subject: [PATCH 04/15] Add DLPack oneAPI support for the XPU device for
55
experimental.
66

77
---
@@ -20,7 +20,7 @@ Subject: [PATCH 01/11] Add DLPack oneAPI support for the XPU device for
2020
create mode 100644 aten/src/ATen/detail/XPUHooksInterface.h
2121

2222
diff --git a/aten/src/ATen/Context.h b/aten/src/ATen/Context.h
23-
index 43f4433b7c..ea2cb3f41d 100644
23+
index 43f4433b7ce..ea2cb3f41db 100644
2424
--- a/aten/src/ATen/Context.h
2525
+++ b/aten/src/ATen/Context.h
2626
@@ -9,6 +9,7 @@
@@ -53,7 +53,7 @@ index 43f4433b7c..ea2cb3f41d 100644
5353
static inline size_t getNumGPUs() {
5454
// WARNING: DO NOT ADD LOGIC TO HANDLE OTHER DEVICE TYPES TO THIS
5555
diff --git a/aten/src/ATen/DLConvertor.cpp b/aten/src/ATen/DLConvertor.cpp
56-
index 614dc46158..817f983913 100644
56+
index 614dc46158e..817f9839137 100644
5757
--- a/aten/src/ATen/DLConvertor.cpp
5858
+++ b/aten/src/ATen/DLConvertor.cpp
5959
@@ -90,13 +90,17 @@ DLDevice getDLDevice(const Tensor& tensor, const int64_t& device_id) {
@@ -109,7 +109,7 @@ index 614dc46158..817f983913 100644
109109
return at::from_blob(
110110
src->dl_tensor.data,
111111
diff --git a/aten/src/ATen/Version.cpp b/aten/src/ATen/Version.cpp
112-
index 4b9da640fb..350480e213 100644
112+
index 4b9da640fb7..350480e2139 100644
113113
--- a/aten/src/ATen/Version.cpp
114114
+++ b/aten/src/ATen/Version.cpp
115115
@@ -195,6 +195,10 @@ std::string show_config() {
@@ -125,7 +125,7 @@ index 4b9da640fb..350480e213 100644
125125
if (!pair.second.empty()) {
126126
diff --git a/aten/src/ATen/detail/XPUHooksInterface.cpp b/aten/src/ATen/detail/XPUHooksInterface.cpp
127127
new file mode 100644
128-
index 0000000000..d740068379
128+
index 00000000000..d740068379d
129129
--- /dev/null
130130
+++ b/aten/src/ATen/detail/XPUHooksInterface.cpp
131131
@@ -0,0 +1,29 @@
@@ -160,7 +160,7 @@ index 0000000000..d740068379
160160
+} // namespace at
161161
diff --git a/aten/src/ATen/detail/XPUHooksInterface.h b/aten/src/ATen/detail/XPUHooksInterface.h
162162
new file mode 100644
163-
index 0000000000..ff42ca60d4
163+
index 00000000000..ff42ca60d49
164164
--- /dev/null
165165
+++ b/aten/src/ATen/detail/XPUHooksInterface.h
166166
@@ -0,0 +1,75 @@
@@ -240,7 +240,7 @@ index 0000000000..ff42ca60d4
240240
+} // namespace detail
241241
+} // namespace at
242242
diff --git a/aten/src/ATen/dlpack.h b/aten/src/ATen/dlpack.h
243-
index 0ad1e119bc..3d33935d31 100644
243+
index 0ad1e119bcb..3d33935d31a 100644
244244
--- a/aten/src/ATen/dlpack.h
245245
+++ b/aten/src/ATen/dlpack.h
246246
@@ -6,6 +6,9 @@
@@ -345,7 +345,7 @@ index 0ad1e119bc..3d33935d31 100644
345345
DLDataType dtype;
346346
/*! \brief The shape of the tensor */
347347
diff --git a/aten/src/ATen/ops/from_blob.h b/aten/src/ATen/ops/from_blob.h
348-
index 62f881fdc3..d6dea29a46 100644
348+
index 62f881fdc38..d6dea29a462 100644
349349
--- a/aten/src/ATen/ops/from_blob.h
350350
+++ b/aten/src/ATen/ops/from_blob.h
351351
@@ -127,10 +127,12 @@ inline Tensor from_blob(
@@ -363,7 +363,7 @@ index 62f881fdc3..d6dea29a46 100644
363363
}
364364

365365
diff --git a/caffe2/python/dlpack.h b/caffe2/python/dlpack.h
366-
index 0ad1e119bc..3d33935d31 100644
366+
index 0ad1e119bcb..3d33935d31a 100644
367367
--- a/caffe2/python/dlpack.h
368368
+++ b/caffe2/python/dlpack.h
369369
@@ -6,6 +6,9 @@
@@ -468,7 +468,7 @@ index 0ad1e119bc..3d33935d31 100644
468468
DLDataType dtype;
469469
/*! \brief The shape of the tensor */
470470
diff --git a/torch/_tensor.py b/torch/_tensor.py
471-
index fd3f338d51..7ec31661b1 100644
471+
index fd3f338d514..7ec31661b1e 100644
472472
--- a/torch/_tensor.py
473473
+++ b/torch/_tensor.py
474474
@@ -1347,6 +1347,8 @@ class Tensor(torch._C._TensorBase):
@@ -481,7 +481,7 @@ index fd3f338d51..7ec31661b1 100644
481481
raise ValueError(
482482
"Unknown device type {} for Dlpack".format(self.device.type)
483483
diff --git a/torch/utils/dlpack.py b/torch/utils/dlpack.py
484-
index ae0aafceb1..a48abcad76 100644
484+
index ae0aafceb17..a48abcad764 100644
485485
--- a/torch/utils/dlpack.py
486486
+++ b/torch/utils/dlpack.py
487487
@@ -18,6 +18,7 @@ class DLDeviceType(enum.IntEnum):
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
From 29a49409cb2a2f02889e988d62f961e2b1535257 Mon Sep 17 00:00:00 2001
2+
From: "Yu, Guangye" <106960996+guangyey@users.noreply.github.com>
3+
Date: Thu, 30 Mar 2023 13:26:44 +0800
4+
Subject: [PATCH 05/15] remove dlpack dependency (#106)
5+
6+
* remove dlpack dependency
7+
* rich comments
8+
---
9+
aten/src/ATen/DLConvertor.cpp | 2 +-
10+
aten/src/ATen/detail/XPUHooksInterface.h | 11 ++++++++---
11+
aten/src/ATen/dlpack.h | 5 ++++-
12+
3 files changed, 13 insertions(+), 5 deletions(-)
13+
14+
diff --git a/aten/src/ATen/DLConvertor.cpp b/aten/src/ATen/DLConvertor.cpp
15+
index 817f9839137..c10b25a2298 100644
16+
--- a/aten/src/ATen/DLConvertor.cpp
17+
+++ b/aten/src/ATen/DLConvertor.cpp
18+
@@ -92,7 +92,7 @@ DLDevice getDLDevice(const Tensor& tensor, const int64_t& device_id) {
19+
break;
20+
case DeviceType::XPU:
21+
ctx = at::detail::getXPUHooks().getDLPackDeviceFromATenDevice(
22+
- tensor.device(), tensor.data_ptr());
23+
+ ctx, tensor.device(), tensor.data_ptr());
24+
break;
25+
default:
26+
TORCH_CHECK(false, "Cannot pack tensors on " + tensor.device().str());
27+
diff --git a/aten/src/ATen/detail/XPUHooksInterface.h b/aten/src/ATen/detail/XPUHooksInterface.h
28+
index ff42ca60d49..584ccf8d8c4 100644
29+
--- a/aten/src/ATen/detail/XPUHooksInterface.h
30+
+++ b/aten/src/ATen/detail/XPUHooksInterface.h
31+
@@ -1,6 +1,5 @@
32+
#pragma once
33+
34+
-#include <ATen/dlpack.h>
35+
#include <c10/core/Device.h>
36+
#include <c10/util/Exception.h>
37+
38+
@@ -14,6 +13,11 @@ namespace at {
39+
class Context;
40+
}
41+
42+
+// We use forward declaration here instead of #include <ATen/dlpack.h> to avoid
43+
+// leaking DLPack implementation detail to every project that includes `ATen/Context.h`, which in turn
44+
+// would lead to a conflict when linked with another project using DLPack (for example TVM)
45+
+struct DLDevice_;
46+
+
47+
namespace at {
48+
49+
constexpr const char* XPU_HELP =
50+
@@ -45,7 +49,7 @@ struct TORCH_API XPUHooksInterface {
51+
}
52+
53+
virtual Device getATenDeviceFromDLPackDevice(
54+
- const DLDevice& dl_device,
55+
+ const DLDevice_& dl_device,
56+
void* data) const {
57+
TORCH_CHECK(
58+
false,
59+
@@ -53,7 +57,8 @@ struct TORCH_API XPUHooksInterface {
60+
XPU_HELP);
61+
};
62+
63+
- virtual DLDevice getDLPackDeviceFromATenDevice(
64+
+ virtual DLDevice_& getDLPackDeviceFromATenDevice(
65+
+ DLDevice_& dl_device,
66+
const Device& aten_device,
67+
void* data) const {
68+
TORCH_CHECK(
69+
diff --git a/aten/src/ATen/dlpack.h b/aten/src/ATen/dlpack.h
70+
index 3d33935d31a..ef6960b23a1 100644
71+
--- a/aten/src/ATen/dlpack.h
72+
+++ b/aten/src/ATen/dlpack.h
73+
@@ -94,7 +94,10 @@ typedef enum {
74+
/*!
75+
* \brief A Device for Tensor and operator.
76+
*/
77+
-typedef struct {
78+
+// NB: This is the only difference from
79+
+// https://github.com/dmlc/dlpack/blob/v0.7/include/dlpack/dlpack.h Required to
80+
+// allow forward declaration of DLDevice.
81+
+typedef struct DLDevice_ {
82+
/*! \brief The device type used in the device. */
83+
DLDeviceType device_type;
84+
/*!
85+
--
86+
2.25.1
87+

torch_patches/0008-Support-unpacking-python-dictionary-in-torch.jit.tra.patch renamed to torch_patches/0006-Support-unpacking-python-dictionary-in-torch.jit.tra.patch

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
From 196157b08d6a177159db7657407ec0836207dbf7 Mon Sep 17 00:00:00 2001
1+
From 05a2efae11f38aa519739c800b5e2cd4d6b8defc Mon Sep 17 00:00:00 2001
22
From: Stonepia <tong.su@intel.com>
33
Date: Tue, 14 Feb 2023 12:55:42 +0800
4-
Subject: [PATCH 08/11] Support unpacking python dictionary in
4+
Subject: [PATCH 06/15] Support unpacking python dictionary in
55
torch.jit.trace() (#81623) (#99)
66

77
# Support unpacking python dictionary in **torch.jit.trace()**
@@ -71,7 +71,7 @@ Co-authored-by: tangleintel <lei1.tang@intel.com>
7171
7 files changed, 321 insertions(+), 38 deletions(-)
7272

7373
diff --git a/test/test_jit.py b/test/test_jit.py
74-
index 055c990f85..ee168a1b33 100644
74+
index 055c990f859..ee168a1b339 100644
7575
--- a/test/test_jit.py
7676
+++ b/test/test_jit.py
7777
@@ -3027,6 +3027,46 @@ class TestFrontend(JitTestCase):
@@ -122,7 +122,7 @@ index 055c990f85..ee168a1b33 100644
122122
class TestScript(JitTestCase):
123123

124124
diff --git a/torch/_C/__init__.pyi.in b/torch/_C/__init__.pyi.in
125-
index 9ed156886f..793edbc674 100644
125+
index 9ed156886f3..793edbc674f 100644
126126
--- a/torch/_C/__init__.pyi.in
127127
+++ b/torch/_C/__init__.pyi.in
128128
@@ -332,6 +332,15 @@ def _create_function_from_trace(
@@ -142,7 +142,7 @@ index 9ed156886f..793edbc674 100644
142142
def _last_executed_optimized_graph() -> Graph: ...
143143
def parse_type_comment(comment: str) -> Decl: ...
144144
diff --git a/torch/csrc/jit/python/pybind_utils.h b/torch/csrc/jit/python/pybind_utils.h
145-
index 694d2b8ee4..835c7d0dc7 100644
145+
index 694d2b8ee48..835c7d0dc70 100644
146146
--- a/torch/csrc/jit/python/pybind_utils.h
147147
+++ b/torch/csrc/jit/python/pybind_utils.h
148148
@@ -565,6 +565,17 @@ inline Stack toTraceableStack(const py::tuple& inputs) {
@@ -164,7 +164,7 @@ index 694d2b8ee4..835c7d0dc7 100644
164164
auto elems = c10::impl::GenericList(elem_type);
165165
for (auto elem : obj) {
166166
diff --git a/torch/csrc/jit/python/python_tracer.cpp b/torch/csrc/jit/python/python_tracer.cpp
167-
index 78676e2ed7..c89d54872a 100644
167+
index 78676e2ed77..c89d54872a0 100644
168168
--- a/torch/csrc/jit/python/python_tracer.cpp
169169
+++ b/torch/csrc/jit/python/python_tracer.cpp
170170
@@ -73,6 +73,69 @@ SourceRange getPythonInterpreterSourceRange() {
@@ -238,7 +238,7 @@ index 78676e2ed7..c89d54872a 100644
238238
const py::function& func,
239239
Stack trace_inputs,
240240
diff --git a/torch/csrc/jit/python/python_tracer.h b/torch/csrc/jit/python/python_tracer.h
241-
index 3f1fca20bf..6ec9dc388c 100644
241+
index 3f1fca20bfe..6ec9dc388c3 100644
242242
--- a/torch/csrc/jit/python/python_tracer.h
243243
+++ b/torch/csrc/jit/python/python_tracer.h
244244
@@ -24,6 +24,16 @@ Node* preRecordPythonTrace(
@@ -259,7 +259,7 @@ index 3f1fca20bf..6ec9dc388c 100644
259259
const py::function& func,
260260
Stack inputs,
261261
diff --git a/torch/csrc/jit/python/script_init.cpp b/torch/csrc/jit/python/script_init.cpp
262-
index 110c2f4a70..ee95095889 100644
262+
index 110c2f4a70c..ee950958893 100644
263263
--- a/torch/csrc/jit/python/script_init.cpp
264264
+++ b/torch/csrc/jit/python/script_init.cpp
265265
@@ -1218,6 +1218,43 @@ void initJitScriptBindings(PyObject* module) {
@@ -351,7 +351,7 @@ index 110c2f4a70..ee95095889 100644
351351
"_jit_script_class_compile",
352352
[](const std::string& qualifiedName,
353353
diff --git a/torch/jit/_trace.py b/torch/jit/_trace.py
354-
index fe0091f63b..b4352648df 100644
354+
index fe0091f63bb..b4352648df9 100644
355355
--- a/torch/jit/_trace.py
356356
+++ b/torch/jit/_trace.py
357357
@@ -316,6 +316,7 @@ def _check_trace(

torch_patches/0009-Add-API-for-intel-XPU-to-register-new-tensor-type-87.patch renamed to torch_patches/0007-Add-API-for-intel-XPU-to-register-new-tensor-type-87.patch

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
From 81caf18513132fb25d2b3bbd1b728086ad9f6e8b Mon Sep 17 00:00:00 2001
1+
From 4930caf206be3425947f4df914c8a5e52c00ba9b Mon Sep 17 00:00:00 2001
22
From: majing <jing1.ma@intel.com>
33
Date: Fri, 18 Nov 2022 15:40:13 +0800
4-
Subject: [PATCH 09/11] Add API for intel XPU to register new tensor type (#87)
4+
Subject: [PATCH 07/15] Add API for intel XPU to register new tensor type (#87)
55

66
Co-authored-by: chengjunlu <chengjun.lu@intel.com>
77
---
@@ -12,7 +12,7 @@ Co-authored-by: chengjunlu <chengjun.lu@intel.com>
1212
4 files changed, 90 insertions(+), 73 deletions(-)
1313

1414
diff --git a/torch/csrc/tensor/python_tensor.cpp b/torch/csrc/tensor/python_tensor.cpp
15-
index 648fd04186..4d6778a7b0 100644
15+
index 648fd041868..4d6778a7b08 100644
1616
--- a/torch/csrc/tensor/python_tensor.cpp
1717
+++ b/torch/csrc/tensor/python_tensor.cpp
1818
@@ -60,8 +60,7 @@ static_assert(
@@ -225,7 +225,7 @@ index 648fd04186..4d6778a7b0 100644
225225
}
226226

227227
diff --git a/torch/csrc/tensor/python_tensor.h b/torch/csrc/tensor/python_tensor.h
228-
index ab74e05341..5827f3b4ce 100644
228+
index ab74e053419..5827f3b4ce3 100644
229229
--- a/torch/csrc/tensor/python_tensor.h
230230
+++ b/torch/csrc/tensor/python_tensor.h
231231
@@ -4,6 +4,11 @@
@@ -251,7 +251,7 @@ index ab74e05341..5827f3b4ce 100644
251251
//
252252
// TODO: This is nuts! There is no reason to let the default tensor type id
253253
diff --git a/torch/csrc/utils/tensor_types.cpp b/torch/csrc/utils/tensor_types.cpp
254-
index 8a20c93d87..0d3c6c1f31 100644
254+
index 8a20c93d87a..0d3c6c1f31d 100644
255255
--- a/torch/csrc/utils/tensor_types.cpp
256256
+++ b/torch/csrc/utils/tensor_types.cpp
257257
@@ -19,7 +19,7 @@ using namespace at;
@@ -264,7 +264,7 @@ index 8a20c93d87..0d3c6c1f31 100644
264264
case at::Backend::CPU:
265265
return "torch";
266266
diff --git a/torch/csrc/utils/tensor_types.h b/torch/csrc/utils/tensor_types.h
267-
index b45c284c9c..729b3e326f 100644
267+
index b45c284c9c1..729b3e326f1 100644
268268
--- a/torch/csrc/utils/tensor_types.h
269269
+++ b/torch/csrc/utils/tensor_types.h
270270
@@ -8,6 +8,7 @@

0 commit comments

Comments
 (0)