Commit 2cacc74
committed
Update on "make aoti_torch_empty_strided support creating incontiguous tensor"
This diff modifies the `aoti_torch_empty_strided` function to support the creation of incontiguous tensors.
To achieve it, this diff:
1. update the way to calculate the memory size by using both tensor size and the stride
2. skip stride check in ETensor by adding and checking cmake macro `USE_CUDA_BACKEND` when building with CUDA backend support.
we will soon bring the ETensor check back for every backend after migrating to use slimtensor.
Differential Revision: [D84938258](https://our.internmc.facebook.com/intern/diff/D84938258/)
[ghstack-poisoned]File tree
48 files changed
+1799
-409
lines changed- .ci
- docker/ci_commit_pins
- scripts
- .github/workflows
- backends
- aoti
- apple/coreml/runtime/delegate
- arm/runtime
- cadence/aot
- cuda
- runtime
- shims
- vulkan/runtime/graph/ops/glsl
- xnnpack
- runtime
- utils
- examples
- models
- moshi/mimi
- stable_diffusion
- voxtral
- openvino/stable_diffusion
- extension
- android
- executorch_android/src/main/java/org/pytorch/executorch/extension/llm
- jni
- llm/runner
- kernels
- optimized/cpu
- portable/cpu
- runtime
- core/portable_type/c10
- c10/util
- torch/headeronly
- macros
- util
- platform
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
48 files changed
+1799
-409
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
47 | 85 | | |
48 | 86 | | |
49 | 87 | | |
| |||
101 | 139 | | |
102 | 140 | | |
103 | 141 | | |
| 142 | + | |
104 | 143 | | |
105 | 144 | | |
106 | 145 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
351 | 351 | | |
352 | 352 | | |
353 | 353 | | |
| 354 | + | |
354 | 355 | | |
355 | 356 | | |
356 | 357 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | 102 | | |
125 | 103 | | |
126 | 104 | | |
| |||
909 | 887 | | |
910 | 888 | | |
911 | 889 | | |
912 | | - | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
913 | 893 | | |
914 | | - | |
915 | | - | |
916 | | - | |
917 | | - | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
918 | 897 | | |
919 | 898 | | |
920 | 899 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
74 | 79 | | |
75 | 80 | | |
76 | 81 | | |
| |||
87 | 92 | | |
88 | 93 | | |
89 | 94 | | |
| 95 | + | |
90 | 96 | | |
91 | 97 | | |
92 | 98 | | |
| |||
Lines changed: 17 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
102 | 113 | | |
103 | 114 | | |
104 | 115 | | |
| |||
117 | 128 | | |
118 | 129 | | |
119 | 130 | | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
120 | 137 | | |
121 | 138 | | |
122 | 139 | | |
| |||
0 commit comments