Commit 41d25c5
Clean up GPU backend: remove dead matmul, redundant branches, and duplicate logic
- Remove wasted cp.matmul call in CTRNN loop that computed and discarded result;
use pre-allocated s_buf via out= parameter instead
- Remove per_genome_inputs if/else branches where both paths were identical
(CuPy broadcasting handles both input shapes)
- Collapse duplicate input-building if/else in both GPU evaluator classes using
np.zeros((num_steps, *first_input.shape))
- Eliminate N = len(genomes) that could diverge from input_fn's actual shape
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 56653d4 commit 41d25c5
2 files changed
+21
-59
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
| 134 | + | |
| 135 | + | |
142 | 136 | | |
143 | 137 | | |
144 | 138 | | |
| |||
165 | 159 | | |
166 | 160 | | |
167 | 161 | | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
| 162 | + | |
172 | 163 | | |
173 | 164 | | |
174 | 165 | | |
175 | | - | |
176 | | - | |
| 166 | + | |
177 | 167 | | |
178 | 168 | | |
179 | 169 | | |
| |||
187 | 177 | | |
188 | 178 | | |
189 | 179 | | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
| 180 | + | |
194 | 181 | | |
195 | 182 | | |
196 | 183 | | |
| |||
235 | 222 | | |
236 | 223 | | |
237 | 224 | | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
245 | 228 | | |
246 | 229 | | |
247 | 230 | | |
| |||
263 | 246 | | |
264 | 247 | | |
265 | 248 | | |
266 | | - | |
267 | | - | |
268 | | - | |
269 | | - | |
| 249 | + | |
270 | 250 | | |
271 | 251 | | |
272 | 252 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| 70 | + | |
70 | 71 | | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
87 | 77 | | |
88 | 78 | | |
89 | 79 | | |
| |||
131 | 121 | | |
132 | 122 | | |
133 | 123 | | |
| 124 | + | |
134 | 125 | | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
149 | 131 | | |
150 | 132 | | |
151 | 133 | | |
| |||
0 commit comments