Commit 50d93ff
committed
Index tiled image buffer in 3D instead of flattening to 1D
Addresses review feedback on #7500.
render() flattened each annotator's tiled buffer into a single 1D
Warp array, whose length is num_envs * tile pixels * channels. That
product can exceed the maximum size of a single Warp array
dimension, so large environment counts / camera resolutions failed
with:
ValueError: Array shapes must not exceed the maximum representable
value of a signed 32-bit integer, got 2621440000 in dimension 0
Refactor reshape_tiled_image to index the tiled buffer as a 3D array
(num_tiles_y * image_height, num_tiles_x * image_width, num_channels)
and update the overloads to ndim=3, so each dimension is bounded
individually rather than by their product. Single-channel annotators
return a 2D buffer, so the renderer adds the trailing channel
dimension before launching.
This removes the need for the preflight size check added earlier in
this PR, which is dropped along with the hardcoded Warp dimension
limit: per review, that limit is a Warp implementation detail rather
than a contract, and the check also assumed 4 elements per pixel for
every camera, wrongly rejecting valid single-channel configurations.
Verified against Warp 1.9.1 on GPU: the refactored kernel is
numerically identical to the previous implementation across RGBA,
depth, normals and ragged-grid cases; a (25600, 25600, 4) buffer --
the exact geometry from the reported failure -- still raises on
.flatten() but launches successfully through the 3D path.1 parent df441d6 commit 50d93ff
4 files changed
Lines changed: 38 additions & 46 deletions
File tree
- source
- isaaclab_physx
- changelog.d
- isaaclab_physx/renderers
- isaaclab
- changelog.d
- isaaclab/utils/warp
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
344 | 344 | | |
345 | 345 | | |
346 | 346 | | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
347 | 352 | | |
348 | | - | |
| 353 | + | |
| 354 | + | |
349 | 355 | | |
350 | 356 | | |
351 | 357 | | |
| |||
358 | 364 | | |
359 | 365 | | |
360 | 366 | | |
361 | | - | |
362 | | - | |
363 | | - | |
364 | | - | |
365 | | - | |
366 | | - | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
367 | 370 | | |
368 | 371 | | |
369 | 372 | | |
370 | | - | |
| 373 | + | |
371 | 374 | | |
372 | 375 | | |
373 | 376 | | |
374 | 377 | | |
375 | 378 | | |
376 | | - | |
| 379 | + | |
377 | 380 | | |
378 | 381 | | |
379 | 382 | | |
380 | 383 | | |
381 | | - | |
| 384 | + | |
382 | 385 | | |
383 | 386 | | |
384 | 387 | | |
385 | 388 | | |
386 | | - | |
| 389 | + | |
387 | 390 | | |
388 | 391 | | |
389 | 392 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
Lines changed: 10 additions & 31 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | 86 | | |
113 | 87 | | |
114 | 88 | | |
| |||
276 | 250 | | |
277 | 251 | | |
278 | 252 | | |
279 | | - | |
280 | | - | |
281 | | - | |
282 | | - | |
283 | 253 | | |
284 | 254 | | |
285 | 255 | | |
| |||
617 | 587 | | |
618 | 588 | | |
619 | 589 | | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
620 | 599 | | |
621 | 600 | | |
622 | 601 | | |
623 | 602 | | |
624 | | - | |
| 603 | + | |
625 | 604 | | |
626 | 605 | | |
627 | 606 | | |
| |||
0 commit comments