Commit bede0d2
Fix GPU scalar indexing in BatchExaModel structure queries
BatchExaModel.jac_structure! and hess_structure! now pass getbackend(m)
to backend-aware _jac_structure!/_obj_hess_structure!/_con_hess_structure!
so the KA extension can intercept and use GPU kernels instead of
scalar-indexing f.itr arrays.
Also converts obj_weight to model type T in batch hess_coord! to prevent
Metal InvalidIRError from Float64 values on Float32 models.
FlatNLPModel structure queries now use device-native temp arrays for the
per-instance query, then copy to CPU for replication.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent b451da2 commit bede0d2
2 files changed
Lines changed: 31 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
226 | 226 | | |
227 | 227 | | |
228 | 228 | | |
229 | | - | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
230 | 237 | | |
231 | 238 | | |
232 | | - | |
233 | | - | |
234 | | - | |
| 239 | + | |
| 240 | + | |
235 | 241 | | |
236 | 242 | | |
237 | 243 | | |
| |||
261 | 267 | | |
262 | 268 | | |
263 | 269 | | |
264 | | - | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
265 | 278 | | |
266 | 279 | | |
267 | | - | |
268 | | - | |
269 | | - | |
| 280 | + | |
| 281 | + | |
270 | 282 | | |
271 | 283 | | |
272 | 284 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1329 | 1329 | | |
1330 | 1330 | | |
1331 | 1331 | | |
| 1332 | + | |
| 1333 | + | |
1332 | 1334 | | |
1333 | 1335 | | |
1334 | 1336 | | |
| |||
1341 | 1343 | | |
1342 | 1344 | | |
1343 | 1345 | | |
| 1346 | + | |
| 1347 | + | |
1344 | 1348 | | |
1345 | 1349 | | |
1346 | 1350 | | |
1347 | 1351 | | |
1348 | 1352 | | |
1349 | 1353 | | |
| 1354 | + | |
| 1355 | + | |
1350 | 1356 | | |
1351 | 1357 | | |
1352 | 1358 | | |
| |||
1890 | 1896 | | |
1891 | 1897 | | |
1892 | 1898 | | |
1893 | | - | |
| 1899 | + | |
1894 | 1900 | | |
1895 | 1901 | | |
1896 | 1902 | | |
| |||
1909 | 1915 | | |
1910 | 1916 | | |
1911 | 1917 | | |
1912 | | - | |
1913 | | - | |
| 1918 | + | |
| 1919 | + | |
| 1920 | + | |
1914 | 1921 | | |
1915 | 1922 | | |
1916 | 1923 | | |
| |||
1928 | 1935 | | |
1929 | 1936 | | |
1930 | 1937 | | |
1931 | | - | |
| 1938 | + | |
1932 | 1939 | | |
1933 | 1940 | | |
1934 | 1941 | | |
| |||
0 commit comments