• Home
  • Raw
  • Download

Lines Matching full:torch

3 import torch
4 from torch.testing import FileCheck
5 from torch.testing._internal.jit_utils import JitTestCase
20 torch.tensor([[1 + x, 2 + x, 3 + x], [4 + x, 5 + x, 6 + x]])
22 else torch.tensor([[1 + x, 2 + x], [3 + x, 4 + x], [5 + x, 6 + x]])
28 T1: torch.Tensor,
29 T2: torch.Tensor,
30 T3: torch.Tensor,
31 T4: torch.Tensor,
32 T5: torch.Tensor,
33 T6: torch.Tensor,
34 T7: torch.Tensor,
35 T8: torch.Tensor,
38 torch.mm(T1, T2)
39 + torch.mm(T3, T4)
40 + torch.mm(T5, T6)
41 + torch.mm(T7, T8)
44 test_batch_mm_scripted = torch.jit.script(test_batch_mm)
62 T1: torch.Tensor,
63 T2: torch.Tensor,
64 T3: torch.Tensor,
65 T4: torch.Tensor,
66 T5: torch.Tensor,
67 T6: torch.Tensor,
68 T7: torch.Tensor,
69 T8: torch.Tensor,
73 torch.mm(T1, T2)
74 + torch.mm(T3, T4)
75 + torch.mm(T5, T6)
76 + torch.mm(T7, T8)
78 result["constant"] = torch.tensor([42.0])
81 test_batch_mm_scripted = torch.jit.script(test_batch_mm)
98 @torch.jit.script
100 T1 = torch.zeros((n, n))
101 T2 = torch.zeros((n, n))
102 T3 = torch.zeros((n, n))
103 T4 = torch.zeros((n, n))
104 T5 = torch.zeros((n, n))
105 T6 = torch.zeros((n, n))
106 T7 = torch.zeros((n, n))
107 T8 = torch.zeros((n, n))
108 torch.relu_(T1)
110 torch.mm(T1, T2)
111 + torch.mm(T3, T4)
112 + torch.mm(T5, T6)
113 + torch.mm(T7, T8)
124 @torch.jit.script
126 T1 = torch.zeros((n, n))
127 T2 = torch.zeros((n, n))
128 T3 = torch.zeros((n, n))
129 T4 = torch.zeros((n, n))
130 T5 = torch.zeros((n, n))
131 T6 = torch.zeros((n, n))
132 T7 = torch.zeros((n, n))
133 T8 = torch.zeros((n, n))
134 T9 = torch.zeros((n, n))
135 T10 = torch.zeros((n, n))
136 torch.relu_(T1)
139 torch.mm(T2, T3)
140 + torch.mm(T4, T5)
141 + torch.mm(T6, T7)
142 + torch.mm(T8, T9)
145 torch.mm(T1, T2)
146 + torch.mm(T3, T4)
147 + torch.mm(T5, T6)
148 + torch.mm(T7, T8)
149 + torch.mm(T9, T10)
159 @torch.jit.script
161 T1 = torch.zeros((n, n))
162 T2 = torch.zeros((n, n))
163 T3 = torch.zeros((n, n))
164 T4 = torch.zeros((n, n))
165 T5 = torch.zeros((n, n))
166 T6 = torch.zeros((n, n))
167 T7 = torch.zeros((n, n))
168 T8 = torch.zeros((n, n))
169 T9 = torch.zeros((n, n))
170 T10 = torch.zeros((n, n))
172 torch.relu_(T1)
174 torch.mm(T1, T2)
175 + torch.mm(T3, T4)
176 + torch.mm(T5, T6)
177 + torch.mm(T7, T8)
178 + torch.mm(T9, T10)
182 torch.mm(T2, T3)
183 + torch.mm(T4, T5)
184 + torch.mm(T6, T7)
185 + torch.mm(T8, T9)
194 @torch.jit.script
197 A = torch.zeros((n, n))
198 T1 = torch.zeros((n, n))
199 T2 = torch.zeros((n, n))
200 T3 = torch.zeros((n, n))
201 T4 = torch.zeros((n, n))
202 T5 = torch.zeros((n, n))
203 T6 = torch.zeros((n, n))
204 T7 = torch.zeros((n, n))
205 T8 = torch.zeros((n, n))
206 result["T1"] = torch.mm(A, T1)
207 result["T2"] = torch.mm(A, T2)
208 result["T3"] = torch.mm(A, T3)
209 result["T4"] = torch.mm(A, T4)
210 result["T5"] = torch.mm(A, T5)
211 result["T6"] = torch.mm(A, T6)
212 result["T7"] = torch.mm(A, T7)
213 result["T8"] = torch.mm(A, T8)
223 @torch.jit.script
225 A = torch.zeros((n, n))
226 T1 = torch.zeros((n, n))
227 T2 = torch.zeros((n, n))
228 T3 = torch.zeros((n, n))
229 T4 = torch.zeros((n, n))
230 T5 = torch.zeros((n, n))
231 T6 = torch.zeros((n, n))
232 T7 = torch.zeros((n, n))
233 T8 = torch.zeros((n, n))
234 T9 = torch.zeros((n, n))
235 T10 = torch.zeros((n, n))
236 torch.relu_(T1)
238 result["T1"] = torch.mm(A, T1)
239 result["T2"] = torch.mm(A, T2)
240 result["T3"] = torch.mm(A, T3)
241 result["T4"] = torch.mm(A, T4)
242 result["T5"] = torch.mm(A, T5)
243 result["T6"] = torch.mm(A, T6)
244 result["T7"] = torch.mm(A, T7)
245 result["T8"] = torch.mm(A, T8)
246 result["T9"] = torch.mm(A, T9)
247 result["T10"] = torch.mm(A, T10)
259 @torch.jit.script
261 A = torch.zeros((n, n))
262 T1 = torch.zeros((n, n))
263 T2 = torch.zeros((n, n))
264 T3 = torch.zeros((n, n))
265 T4 = torch.zeros((n, n))
266 T5 = torch.zeros((n, n))
267 T6 = torch.zeros((n, n))
268 T7 = torch.zeros((n, n))
269 T8 = torch.zeros((n, n))
270 T9 = torch.zeros((n, n))
271 T10 = torch.zeros((n, n))
272 torch.relu_(A)
274 result["T1"] = torch.mm(A, T1)
275 result["T2"] = torch.mm(A, T2)
276 result["T3"] = torch.mm(A, T3)
277 result["T4"] = torch.mm(A, T4)
278 result["T5"] = torch.mm(A, T5)
279 result["T6"] = torch.mm(A, T6)
280 result["T7"] = torch.mm(A, T7)
281 result["T8"] = torch.mm(A, T8)
282 result["T9"] = torch.mm(A, T9)
283 result["T10"] = torch.mm(A, T10)