File tree Expand file tree Collapse file tree 3 files
8000
changed +16
-7
lines changed Expand file tree Collapse file tree 3 files changed +16
-7
lines changed Original file line number Diff line number Diff line change @@ -84,6 +84,8 @@ include_patterns = [
84
84
' torch/csrc/**/*.h' ,
85
85
' torch/csrc/**/*.hpp' ,
86
86
' torch/csrc/**/*.cpp' ,
87
+ ' torch/nativert/**/*.h' ,
88
+ ' torch/nativert/**/*.cpp' ,
87
89
' test/cpp/**/*.h' ,
88
90
' test/cpp/**/*.cpp' ,
89
91
]
@@ -232,6 +234,10 @@ include_patterns = [
232
234
' torch/csrc/**/*.cpp' ,
233
235
' torch/csrc/jit/serialization/*.h' ,
234
236
' torch/csrc/jit/serialization/*.cpp' ,
237
+ ' torch/nativert/*.h' ,
238
+ ' torch/nativert/*.cpp' ,
239
+ ' torch/nativert/**/*.h' ,
240
+ ' torch/nativert/**/*.cpp' ,
235
241
]
236
242
exclude_patterns = [
237
243
# The negative filters below are to exclude files that include onnx_pb.h or
@@ -533,6 +539,7 @@ include_patterns = [
533
539
' c10/**' ,
534
540
' aten/**' ,
535
541
' torch/csrc/**' ,
542
+ ' torch/nativert/**' ,
536
543
]
537
544
exclude_patterns = [
538
545
' aten/src/ATen/native/quantized/cpu/qnnpack/**' ,
@@ -760,6 +767,7 @@ include_patterns = [
760
767
' aten/**' ,
761
768
' c10/**' ,
762
769
' torch/csrc/**' ,
770
+ ' torch/nativert/**' ,
763
771
]
764
772
exclude_patterns = [
765
773
' aten/src/ATen/cuda/CUDAContext.cpp' ,
@@ -1014,6 +1022,7 @@ include_patterns = [
1014
1022
' c10/**' ,
1015
1023
' aten/**' ,
1016
1024
' torch/csrc/**' ,
1025
+ ' torch/nativert/**' ,
1017
1026
]
1018
1027
exclude_patterns = [
1019
1028
' c10/util/CallOnce.h' ,
@@ -1058,6 +1067,7 @@ include_patterns = [
1058
1067
' c10/**' ,
1059
1068
' aten/**' ,
1060
1069
' torch/csrc/**' ,
1070
+ ' torch/nativert/**' ,
1061
1071
]
1062
1072
exclude_patterns = [
1063
1073
' **/fb/**' ,
Original file line number Diff line number Diff line change @@ -92,17 +92,16 @@ c10::Layout convertJsonLayout(const torch::_export::Layout& layout) {
92
92
c10::Device convertJsonDevice (const torch::_export::Device& device) {
93
93
c10::Device d (device.get_type ());
94
94
if (auto index = device.get_index ()) {
95
- d.set_index (*index );
95
+ d.set_index (static_cast <at::DeviceIndex>( *index ) );
96
96
}
97
97
return d;
98
98
}
99
99
100
100
TensorMeta::TensorMeta (const torch::_export::TensorMeta& tensorMeta)
101
- : device_(convertJsonDevice(tensorMeta.get_device())) {
102
- dtype_ = convertJsonScalarType (tensorMeta.get_dtype ());
103
- layout_ = convertJsonLayout (tensorMeta.get_layout ());
104
- requiresGrad_ = tensorMeta.get_requires_grad ();
105
-
101
+ : dtype_(convertJsonScalarType(tensorMeta.get_dtype())),
102
+ layout_ (convertJsonLayout(tensorMeta.get_layout())),
103
+ requiresGrad_(tensorMeta.get_requires_grad()),
104
+ device_(convertJsonDevice(tensorMeta.get_device())) {
106
105
if (tensorMeta.get_storage_offset ().tag () ==
107
106
torch::_export::SymInt::Tag::AS_INT) {
108
107
storage_offset_ = tensorMeta.get_storage_offset ().get_as_int ();
Original file line number Diff line number Diff line change 3
3
#include < c10/core/Device.h>
4
4
#include < c10/util/Logging.h>
5
5
6
+ #include < c10/core/Layout.h>
6
7
#include < c10/core/MemoryFormat.h>
7
8
#include < c10/core/ScalarType.h>
8
9
#include < c10/core/TensorOptions.h>
9
- #include " c10/core/Layout.h"
10
10
#include < c10/util/ArrayRef.h>
11
11
12
12
#include < torch/csrc/utils/generated_serialization_types.h>
You can’t perform that action at this time.
0 commit comments