Conversation
Merging this PR will degrade performance by 48.3%
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ❌ | WallTime | test_benchmark_spergel_conv[run] |
265.2 ms | 382.6 ms | -30.68% |
| ⚡ | WallTime | test_benchmarks_lanczos_interp[xval-conserve_dc-run] |
114.9 µs | 85.3 µs | +34.62% |
| ❌ | WallTime | test_benchmarks_metacal[run] |
18.4 ms | 35.6 ms | -48.3% |
| ⚡ | WallTime | test_benchmarks_lanczos_interp[xval-no_conserve_dc-run] |
101.4 µs | 76 µs | +33.42% |
| ⚡ | WallTime | test_benchmark_moffat_init[run] |
83.1 µs | 62.3 µs | +33.42% |
| ❌ | WallTime | test_benchmark_spergel_xvalue[run] |
1.6 s | 2.9 s | -42.61% |
| ❌ | WallTime | test_benchmark_moffat_conv[run] |
290.1 ms | 423.9 ms | -31.58% |
Comparing fix-bounds-scene-rend (a401286) with main (d2f2d94)
| return int(x) | ||
| except Exception: | ||
| try: | ||
| if not jnp.any(jnp.isnan(x)): |
There was a problem hiding this comment.
All the changes in this block need to be backed out and redone in a new way. This was hack to get the thing moving. The issue is that sometimes this function encounters not just arrays, floats, ints, and tracers, but also jax leaf objects. :/
This PR addresses some of the full-scene rendering issues raised in #190.
There were a few issues, many of which were unrelated:
One change that we could explore to make all of this more automatic would be to represent image bounds as a location + width, instead of (xmin, xmax, ymin, ymax). This would be more compatible with JAX since we could force the width to be a python int and then automatically use dynamic slice operators to add images together within the bounds.